home *** CD-ROM | disk | FTP | other *** search
/ Aminet 1 (Walnut Creek) / Aminet - June 1993 [Walnut Creek].iso / aminet / util / gnu / emacs_src_18_58.lha / emacs-18.58 / etc / FAQ < prev    next >
Text File  |  1992-02-21  |  126KB  |  2,801 lines

  1. If you are viewing this text in a GNU Emacs Buffer, you can type "M-2 C-x $" to
  2. get an overview of just the questions.  Then, when you want to look at the text
  3. of the answers, just type "C-x $".
  4.  
  5. To search for a question numbered XXX, type "M-C-s ^XXX:", followed by a C-r if
  6. that doesn't work, then type ESC to end the search.
  7.  
  8. A `+' in the 78th column means something was inserted on the line.  A `-' means
  9. something was deleted and a `!' means some combination of insertions,
  10. deletions, and changes occurred.
  11.  
  12. Full instructions for getting the latest FAQ are in the `Introduction to
  13. news.answers' posting in the `news.answers' newsgroup.  If you don't have
  14. USENET access, send e-mail to `mail-server@pit-manager.mit.edu' with `help' and
  15. `index' on separate lines or use anonymous FTP to pit-manager.mit.edu.
  16.  
  17.  
  18. Notation Used in the Answers (READ THIS SECTION FIRST!)
  19.   
  20.   You may skip this section if you are reasonably familiar with GNU Emacs.
  21.   Some of these are not actually frequently asked questions, but knowing
  22.   them is important for understanding the answers to the rest of the
  23.   questions.
  24.  
  25. 1: What do things like this mean: C-h, M-C-a, RET, etc.?
  26.   
  27.   C-a means press the "a" key while holding down the "Control" key.  The
  28.   ASCII code this sends will generally be the value that would be sent by
  29.   pressing just "a" minus 96 or 64.  Either way it will be a number from 0
  30.   to 31.
  31.   
  32.   M-a means press the "a" key while holding down the "Meta" key.  The
  33.   ASCII code this sends is the sum of the ASCII code that would be sent by
  34.   pressing just "a" and 128.
  35.   
  36.   M-C-a means press the "a" key while holding down both the "Control" key
  37.   and the "Meta" key.  C-M-a is a synonym for M-C-a.
  38.   
  39.   * RET means press the "Return" key.  RET is the same as C-m.  This sends
  40.     ASCII code 13.
  41.   * LFD means press the "Linefeed" key.  LFD is also the same as C-j.  This
  42.     sends ASCII code 10.  Under Unix, ASCII code 10 is more often called
  43.     "Newline".
  44.   * DEL means press the "Delete" key.  DEL is the same as C-?.  This sends
  45.     ASCII code 127.  (WARNING: It is a misnomer to call C-? a "control" key,
  46.     since 127 has both bits 6 and 7 turned ON, and the rule for control keys
  47.     is that they have 6 and 7 turned OFF.  Also, on very few keyboards does
  48.     Control-? generate ASCII code 127.  In fact, Control-? (which is
  49.     actually Control-Shift-/) is more likely to generate C-_, ASCII code
  50.     31!)
  51.   * ESC means press the "Escape" key.  ESC is the same as C-[.  This sends
  52.     ASCII code 27.
  53.   * SPC means press the "Space" key.  This send ASCII code 32.
  54.   * TAB means press the "Tab" key.  TAB is the same as C-i.  This send ASCII
  55.     code 9.
  56.   
  57.   For C-@ and C-^, usually you don't have to hold down the shift key and you +
  58.   can type Control-2 or Control-6 instead.  For C-_, you may have to hold    +
  59.   down the shift key, typing Control-Shift-Hyphen.  C-@ can often be         +
  60.   generated by typing Control-Space.  C-@ is often called the NUL character, +
  61.   and has ASCII value 0.  C-_ can often be generated by typing Control-7 or  +
  62.   Control-/.  Try Control with all of the digits on your keyboard to see     +
  63.   what gets generated.                                                       +
  64.   
  65.   To read more about this online, type "C-h i m emacs RET m characters
  66.   RET", and also "C-h i m emacs RET m keys RET".
  67.   
  68. 2: What do you mean when you write things like this: type "ESC a"?
  69.   
  70.   I will enclose key sequences that are longer than one key inside double
  71.   quotes.  These notations refer to single key strokes (some with
  72.   modifiers):
  73.   
  74.     C-x, M-x, M-C-x
  75.     RET, LFD, DEL, ESC, SPC, TAB
  76.   
  77.   I separate these from other keys within double quotes by spaces.  Any
  78.   real spaces that I write inside double quotes can be ignored, only SPC
  79.   means press the space key.  All other characters within double quotes
  80.   represent single keys (some shifted).
  81.   
  82. 3: What if I don't have a Meta key?
  83.   
  84.   Instead of typing M-a, you can type "ESC a" instead.  In fact, Emacs
  85.   converts M-a internally into "ESC a" anyway (depending on the value of
  86.   meta-prefix-char).
  87.   
  88. 4: What if I don't have an Escape key?
  89.   
  90.   Type C-[ instead.  This should send ASCII code 27 just like an Escape
  91.   key would.
  92.   
  93. 5: What does "M-x command" mean?
  94.   
  95.   "M-x command" means type M-x, then type the name of the command, then
  96.   type RET.
  97.   
  98.   M-x is simply the default key sequence that invokes the command
  99.   "execute-extended-command".  This command allows you to run any Emacs
  100.   command if you can remember the command's name.  If you can't remember
  101.   the command's name, you can type TAB and SPC for completion, and ? for a
  102.   list of possibilities.  An Emacs "command" is any "interactive" Emacs
  103.   function.
  104.   
  105.   NOTE: Your system administrator may have bound other key sequences to
  106.   invoke execute-extended-command.  A function key labeled "Do" is a good
  107.   candidate for this.
  108.   
  109.   To run non-interactive Emacs functions, use M-ESC instead and type a
  110.   Lisp form that invokes the function (see question 103).
  111.   
  112. 6: What do things like this mean: etc/SERVICE, src/config.h,
  113.  lisp/default.el?
  114.   
  115.   These are the names of files that are part of the GNU Emacs
  116.   distribution.  The GNU Emacs distribution is divided into several
  117.   subdirectories; the important subdirectories are named "etc", "lisp",
  118.   and "src".
  119.   
  120.   If you use GNU Emacs, but don't know where it is kept on your system,
  121.   start Emacs, then type "C-h v exec-directory RET".  The directory name
  122.   that is displayed by this will be the full pathname of the "etc"
  123.   directory of your installed GNU Emacs distribution.
  124.   
  125.   Some of these files are available individually via FTP or e-mail, see
  126.   question 20.
  127.   
  128. 7: What are FSF, LPF, OSF, GNU, RMS, FTP, and GPL?
  129.   
  130.   FSF == Free Software Foundation
  131.   LPF == League for Programming Freedom
  132.   OSF == Open Software Foundation
  133.   GNU == GNU's Not Unix
  134.   RMS == Richard Matthew Stallman
  135.   FTP == File Transfer Protocol
  136.   GPL == GNU General Public Licence
  137.   
  138.   NOTE: Avoid confusing the FSF, the LPF, and the OSF.  The LPF opposes
  139.   look-and-feel copyrights and software patents.  The FSF aims to make high
  140.   quality free software available for everyone.  The OSF is a commercial
  141.   organization which wants to provide an alternative, standardized version
  142.   of Unix not controlled by AT&T.
  143.   
  144.   NOTE: The word "free" in the title of the Free Software Foundation refers
  145.   to "freedom", not "zero dollars".  Anyone can charge any price for
  146.   GPL-covered software that they want to.  However, in practice, the freedom
  147.   enforced by the GPL leads to low prices, because you can always get the
  148.   software for less money from someone else, because everyone has the right
  149.   to resell or give away GPL-covered software.
  150.   
  151.  
  152.  
  153. Sources of Information and Help
  154.  
  155. 8: I'm just starting GNU Emacs; how do I do basic editing?
  156.   
  157.   Type "C-h t" to invoke the self-paced tutorial.  Typing just C-h is
  158.   how to enter the help system.
  159.   
  160.   WARNING: your system administrator may have changed C-h to act like DEL.
  161.   You can use M-x help-for-help instead to invoke help.  To discover what
  162.   key (if any) invokes help on your system, type "M-x where-is RET
  163.   help-for-help RET".  This will print a comma-separated list of key
  164.   sequences in the echo area.  Ignore the last character in each key
  165.   sequence listed.  Each of the resulting key sequences invokes help.
  166.   
  167.   NOTE: Emacs's help facility works best if help is invoked by a single
  168.   key.  The variable help-char should hold the value of this character.
  169.   
  170. 9: How do I find out how to do something in GNU Emacs?
  171.   
  172.   There are several methods for finding out how to do things in Emacs.
  173.   
  174.   You should become familiar with the online documentation for Emacs.  The
  175.   complete text of the Emacs manual is available online in a hypertext
  176.   format via the "Info" manual reader.  Type "C-h i" to invoke Info.
  177.   
  178.   You can order a hardcopy of the manual from the FSF.  See question 12.
  179.   
  180.   You can get a printed reference card listing commands and keys to invoke
  181.   them.  You can order one from the FSF for $1 (or 10 for $5), or you can
  182.   print your own from the etc/refcard.tex file in the Emacs distribution.
  183.   
  184.   You can list all of the commands whose names contain a certain word
  185.   (actually which match a regular expression) using the "command-apropos"
  186.   command.  Type "C-h a" to invoke this command.
  187.   
  188.   You can list all of the functions and variables whose names contain a
  189.   certain word using the "apropos" command.  M-x apropos invokes this
  190.   command.
  191.   
  192.   There are many other commands in Emacs for getting help and information.
  193.   To get a list of these commands, type "C-h C-h C-h".
  194.   
  195.   NOTE: You may find that command-apropos and apropos are extremely slow
  196.   on your system.  This will be fixed in Emacs 19.  If you can't wait that
  197.   long, there is a "fast-apropos.el" file available in the Emacs Lisp
  198.   Archive (see question 18) that contains the fix.  This file
  199.   also contains a "super-apropos" command that will list all the functions
  200.   and variables whose documentation strings contain a certain word.
  201.   
  202. 10: Where can I get GNU Emacs on the net (or by snail mail)?
  203.   
  204.   Look in the files etc/DISTRIB and etc/FTP for information on nearby
  205.   archive sites.  If you don't already have GNU Emacs, see question
  206.   20 for how to get these two files.
  207.   
  208.   The latest version is always available via anonymous FTP at MIT
  209.   (prep.ai.mit.edu:/pub/gnu/emacs-18.57.tar.Z).
  210.   
  211. 11: Where can I get help in installing GNU Emacs?
  212.   
  213.   Look in the file etc/SERVICE for names of companies and individuals who
  214.   will sell you this type of service.  An up-to-date version of the
  215.   SERVICE file is available on prep.ai.mit.edu.  See question 20
  216.   for how to retrieve this file.
  217.   
  218. 12: How do I get a printed copy of the GNU Emacs manual?
  219.   
  220.   You can order a printed copy of the GNU Emacs manual from the FSF for
  221.   $20.  For 6 or more manuals the price is $13 each.  (The price may be
  222.   tax-deductible as a business expense.)
  223.   
  224.   The full TeX source for the manual also comes in the "man" directory of
  225.   the Emacs distribution, if you're daring enough to try to print out this
  226.   300 page manual yourself (see question 14).
  227.   
  228.   If you absolutely have to print your own copy, and you don't have TeX,
  229.   you can get a PostScript version via anonymous FTP
  230.   (ab20.larc.nasa.gov:/pub/docs/emacs-18.57.PS.Z, size: 466K, also
  231.   cs.ubc.ca:/src/gnu/manuals_ps/emacs-18.57.ps.Z, which site requests that
  232.   you please CONFINE ANY MAJOR FTPING TO LATE EVENINGS OR EARLY MORNINGS
  233.   OUR TIME (pacific time zone, GMT-8)).
  234.   
  235.   If you don't have TeX you can convert the Texinfo sources into
  236.   {t,n,ps}roff format with the "texi2roff" program, which is available via
  237.   anonymous FTP (archive.cis.ohio-state.edu:
  238.   /pub/gnu/texi2roff/texi2roff.shar.Z)
  239.   
  240.   Carl Witty <cwitty@cs.stanford.edu> writes:
  241.   
  242.     The Emacs manual is also available online in the Info system, which is
  243.     available by typing "C-h i".  In this form, it has hypertext links and
  244.     is very easy to browse or search; many people prefer it to the printed
  245.     manual.
  246.   
  247. 13: How do I install a piece of Texinfo documentation?
  248.   
  249.   First create Info files from the Texinfo files with the "makeinfo"
  250.   program.  makeinfo is available as part of the latest Texinfo package
  251.   (prep.ai.mit.edu:/pub/gnu/texinfo-2.12.tar.Z).  (An old version of         !
  252.   makeinfo somehow got into Emacs 18.57, but several include files are
  253.   missing, so you can't compile it.)
  254.   
  255.   For information about the Texinfo format, read the Texinfo manual which
  256.   comes with Emacs.  This manual also comes installed in Info format, so you
  257.   can read it online.
  258.   
  259.   Neither texinfo-format-buffer nor the makeinfo program install the
  260.   resulting Info files in Emacs's Info tree.  To install Info files:
  261.   
  262.   1. Move the files to the "info" directory in the installed Emacs
  263.      distribution.  See question 6 if you don't know where that
  264.      is.
  265.   
  266.   2. Edit the file info/dir in the installed Emacs distribution, and add a
  267.      line for the top level node in the Info package that you are
  268.      installing.  Follow the examples are already in this file.  The format
  269.      is:
  270.   
  271.      * Topic: (relative-pathname).  Short description of topic.
  272.   
  273.   If you want to install Info files and you don't have the necessary
  274.   privileges, you have two options:
  275.   
  276.   1. Info files don't actually need to be installed.  You can feed a file
  277.      name to the Info-goto-node command (invoked by pressing "g" in Info
  278.      mode) by typing the name of the file in parentheses.  This goes to
  279.      the node named "Top" in that file.  For example, to view a Info file
  280.      named "XXX" in your home directory, you can type this:
  281.   
  282.        C-h i g (~/XXX) RET
  283.   
  284.   2. You can create your own Info directory.  You can tell Emacs where the
  285.      Info directory is by setting the value of the variable Info-directory
  286.      to its pathname.  For example, to use a private Info directory which
  287.      is a subdirectory of your home directory named "Info", you could do
  288.      this:
  289.   
  290.        (setq Info-directory (expand-file-name "~/Info"))
  291.   
  292.      You will need a top-level Info file named "dir" in this directory.
  293.      You can include the system-wide Info directory in your private Info
  294.      directory with symbolic links or by copying it.
  295.   
  296. 14: How do I print a Texinfo file?
  297.   
  298.   1. Make sure the first line of the Texinfo file looks like this:
  299.   
  300.        \input texinfo
  301.   
  302.      You may need to alter "texinfo" to the full pathname of the
  303.      texinfo.tex file, which comes with Emacs as man/texinfo.tex (or copy
  304.      or link it into the current directory).
  305.   
  306.   2. tex XXX.texinfo
  307.   
  308.   3. texindex XXX.??
  309.   
  310.      The "texindex" program comes with Emacs as man/texindex.c.
  311.   
  312.   4. tex XXX.texinfo
  313.   
  314.   5. Print the DVI file XXX.dvi in the normal way for printing DVI files
  315.      at your site.
  316.   
  317.   To get more general instructions, retrieve the latest Texinfo package
  318.   mentioned in question 13.
  319.   
  320. 15: Can I view Info files without using GNU Emacs?
  321.   
  322.   Yes, the `info', `xinfo', and `ivinfo' programs do this.  info uses
  323.   curses, xinfo uses standard X11R4 libraries, and ivinfo uses InterViews.
  324.   You can get info as part of the latest Texinfo package (see question 13).
  325.   xinfo is available separately (prep.ai.mit.edu:
  326.   pub/gnu/xinfo-1.01.01.tar.Z).  ivinfo is available in a comp.sources.misc
  327.   archive or from Tom Horsley <tom@ssd.csd.harris.com>.  For ivinfo, you
  328.   need Stanford's InterViews C++ X library, available via anonymous FTP
  329.   (interviews.stanford.edu).
  330.   
  331. 16: Where can I get documentation on GNU Emacs Lisp?
  332.   
  333.   Within Emacs, you can type "C-h f" to get the documentation for a
  334.   function, "C-h v" for a variable.
  335.   
  336.   For more information, obtain the GNU Emacs Lisp Reference Manual for Emacs
  337.   18 under Unix.  It is available from the FSF for $50 (or 5 for $200).  The
  338.   latest revision available for FTP is edition 1.03 dated 28 January 1991.
  339.   
  340.   For online use, a set of pregenerated Info files is available with the
  341.   Texinfo source for the Emacs Lisp manual via anonymous FTP (Emacs Lisp
  342.   Archive, prep.ai.mit.edu:/pub/gnu/elisp.tar.Z).  (You can also create the
  343.   Info files from the Texinfo source.)  See question 13 for details on
  344.   how to install these files online.
  345.   
  346.   If you are daring enough to try to print this 550 page manual out
  347.   yourself, for instructions see question 14.
  348.   
  349.   Also, as a popular USENET saying goes, "Use the Force, Read the Source".
  350.   
  351. 17: Has someone written an GNU Emacs Lisp package that does XXX?
  352.   
  353.   Probably.  A listing of Emacs Lisp packages, called the Lisp Code
  354.   Directory, is being maintained by Dave Brennan <brennan@rtp.dg.com> and
  355.   Dave Sill <de5@ornl.gov>.  You can search through this list to find if
  356.   someone has written something that fits your needs.
  357.   
  358.   This list is file "LCD-datafile.Z" in the Emacs Lisp Archive.  (See
  359.   question 18 for methods for getting this file.)  The files "lispdir.el.Z"
  360.   and "lispdir.doc.Z" in the archive contain information to help you use the
  361.   list.  Once you have installed lispdir.el and LCD-datafile, then you can
  362.   use the "M-x lisp-dir-apropos" command to look things up in the database.
  363.   For example, the command "M-x lisp-dir-apropos RET ange-ftp RET" produces
  364.   this (outdated) output:
  365.   
  366.             GNU Emacs Lisp Code Apropos -- "ange-ftp"
  367.   
  368.     ange-ftp (3.112)  91-08-12
  369.      Andy Norman, <ange@hplb.hpl.hp.com>
  370.      archive.cis.ohio-state.edu:
  371.        /pub/gnu/emacs/elisp-archive/as-is/ange-ftp.el.Z
  372.      transparent FTP Support for GNU Emacs
  373.   
  374. 18: Where can I get GNU Emacs Lisp packages that don't come with Emacs?
  375.   
  376.   First, check the Lisp Code Directory to find the name of the package you
  377.   are looking for.  (See question 17).  Then check local archives and
  378.   the Emacs Lisp Archive to find a copy of the relevant files.  Then, if
  379.   you still haven't found it, you can send e-mail to the author asking for
  380.   a copy.
  381.   
  382.   NOTE: The archive maintainers do not have time to answer individual
  383.   requests for packages or the list of packages in the archive.  If you
  384.   cannot use FTP or UUCP to access the archive yourself, try to find a
  385.   friend who can, but please don't ask the maintainers.
  386.   
  387.   You can access the Emacs Lisp Archive via anonymous FTP
  388.   (archive.cis.ohio-state.edu:/pub/gnu/emacs/elisp-archive/).  Fetch the
  389.   file "README" first.
  390.   
  391.   NOTE: Any files with names ending in ".Z" are compressed, and you should
  392.   use "binary" mode in FTP to retrieve them.  You should also use binary
  393.   mode whenever you retrieve any files with names ending in ".elc".
  394.   
  395. 19: How do I submit code to the Emacs Lisp Archive?
  396.   
  397.   Submissions should be mailed to elisp-archive@cis.ohio-state.edu.  Mail
  398.   messages (submissions) are automatically saved and periodically archived.
  399.   Urgent mail may be sent directly to Dave Sill <de5@ornl.gov> or Dave
  400.   Brennan <brennan@dg-rtp.dg.com> or should contain the string "urgent" in
  401.   the subject.  The incomoing ftp directory is no longer available at the
  402.   request of Ohio State.
  403.   
  404.   However, if someone has a submission with multiple files (which would be
  405.   archived as a tar file) or binary files, then FTP transfer is preferred
  406.   and can be arranged via an anonymous FTP site.  This is faster than
  407.   uudecoding, unsharing, etc., and re-packaging files.
  408.   
  409.   Before submitting anything, please read the file "guidelines.Z", which is
  410.   available in the archive.  Whenever possible submissions should contain
  411.   a complete LCD entry since this helps reduce administrative overhead for
  412.   the maintainers.  You can include an entry in this format:
  413.   
  414.     ;; LCD Archive Entry:
  415.     ;; package name|author's name|email address
  416.     ;; |description
  417.     ;; |date|version|archive path
  418.   
  419.   For example:
  420.   
  421.     ;; LCD Archive Entry:
  422.     ;; tex-complete|Sebastian Kremer|sk@thp.Uni-Koeln.DE
  423.     ;; |Minibuffer name completion for editing [La]TeX.
  424.     ;; |91-03-26|$Revision: 1.12 $|~/packages/tex-complete.el.Z
  425.   
  426.   Dave Brennan has software which automatically looks for data in this
  427.   format.  The format is fairly flexible.  The entry ends when a line is
  428.   reached with a different prefix or the seventh field terminator is
  429.   seen.
  430.   
  431. 20: What informational files are available for GNU Emacs?
  432.   
  433.   This isn't a frequently asked question, but it should be!  A variety of
  434.   informational files about GNU Emacs and relevant aspects of the GNU
  435.   project are available for you to read.
  436.   
  437.   The following files are available in the "etc" directory of the GNU
  438.   Emacs distribution, and also the latest versions are available
  439.   individually via anonymous FTP (prep.ai.mit.edu:/pub/gnu/etc/):
  440.   
  441.     APPLE -- Why the FSF doen't support GNU Emacs on Apple computers
  442.     DISTRIB -- GNU Emacs Availability Information,
  443.       including the popular "Free Software Foundation Order Form"
  444.     FTP -- How to get GNU Software by Internet FTP or by UUCP
  445.     GNU -- The GNU Manifesto
  446.     INTERVIEW -- Richard Stallman discusses his public-domain
  447.                UNIX-compatible software system
  448.                   with BYTE editors
  449.     MACHINES -- Status of GNU Emacs on Various Machines and Systems
  450.     MAILINGLISTS -- GNU Project Electronic Mailing Lists
  451.     SERVICE -- GNU Service Directory
  452.     SUN-SUPPORT -- includes the popular "Using Emacstool with GNU Emacs"
  453.   
  454.   These files are available in the "etc" directory of the GNU Emacs
  455.   distribution:
  456.   
  457.     DIFF -- Differences between GNU Emacs and Twenex Emacs
  458.     CCADIFF -- Differences between GNU Emacs and CCA Emacs
  459.     GOSDIFF -- Differences between GNU Emacs and Gosling (Unipress??) Emacs
  460.     COPYING -- GNU Emacs General Public License
  461.     NEWS -- GNU Emacs News, a history of user-visible changes
  462.     LPF -- Why you should join the League for Programming Freedom
  463.     FAQ -- GNU Emacs Frequently Asked Questions (You're reading it)
  464.     OPTIONS -- a complete explanation of startup option handling
  465.   
  466.   These files are available via anonymous FTP (prep.ai.mit.edu:/pub/gnu/):
  467.   
  468.     tasks -- GNU Task List
  469.     standards.text -- GNU Coding Standards
  470.   
  471.   In addition, all of the above files are available directly from the FSF
  472.   via e-mail.  Of course, please try to get them from a local source
  473.   first.
  474.   
  475.   These additional files are available from the FSF via e-mail:
  476.   
  477.   * GNU's Bulletin, June, 1991 -- this file includes:
  478.       GNU'S Who
  479.       What Is the Free Software Foundation?
  480.       What Is Copyleft?
  481.       A Small Way to Help Free Software
  482.       GNUs Flashes (important recent developments for project GNU)
  483.       Free Software Support (and how to get it!)
  484.       Copyrighted Programming Languages
  485.       AT&T Threatens Users of X Windows (and other software patent threats)
  486.       Project Gutenberg
  487.       GNU Project Status Report
  488.       GNU in Japan
  489.       GNU Wish List
  490.       Help Keep Government Software Free
  491.       GNU Software Available Now
  492.         Contents of the Emacs Tape
  493.         Contents of the Compiler Tape
  494.         Contents of the X11 Tapes
  495.         VMS Emacs and Compiler Tapes
  496.       GNU Documentation
  497.       How to Get GNU Software
  498.       Free Software for Microcomputers
  499.         GNU Software on Apple computers
  500.         GNU Software on the Amiga
  501.         GNU Software on the Atari
  502.         GNUish MS-DOS project
  503.         Freemacs, an Extensible Editor for MS-DOS
  504.       GNU in Japan
  505.       FSF Order Form
  506.       Thank GNUs
  507.   * Legal issues about contributing code to GNU
  508.   * GNU Project Status Report
  509.   
  510. 21: Where can I get the latest VM, Supercite, GNUS, Calc, Calendar,
  511.  Ange-FTP, VIP, Dired, Ispell, Epoch, Demacs, Freemacs, or Patch?
  512.   
  513.   {If you know of any other packages that are so substantial that they
  514.   deserve to be mentioned here, please tell me.  Having its own mailing list
  515.   or newsgroup or more than half a megabyte of source code are good signs.}
  516.   
  517.   * VM (View Mail) -- another mail reader within Emacs
  518.   
  519.     Author: Kyle Jones <kyle@uunet.uu.net>
  520.     Latest released version: 4.41
  521.     Beta test version: 5.31
  522.     Anonymous FTP:
  523.       Emacs Lisp Archive: packages/vm-4.41.tar.Z, as-is/timer.shar.Z
  524.       ab20.larc.nasa.gov:/pub/vm/{vm-4.41,vm-5.31,timer}.tar.Z
  525.       ftp.uu.net:/pub/vm-{4.41,5.31beta}.tar.Z
  526.     Newsgroups and mailing lists:
  527.       Info-VM:
  528.         gnu.emacs.vm.info
  529.         info-vm-request@uunet.uu.net (for subscriptions)
  530.         info-vm@uunet.uu.net
  531.       Bug-VM:
  532.         gnu.emacs.vm.bug
  533.         bug-vm-request@uunet.uu.net (for subscriptions)
  534.         bug-vm@uunet.uu.net
  535.   
  536.   * SuperCite -- mail and news citation package within Emacs
  537.   
  538.     Author: Barry Warsaw <bwarsaw@cen.com>
  539.     Mailing list: supercite-request@anthem.nlm.nih.gov (for subscriptions)
  540.           supercite@anthem.nlm.nih.gov
  541.     Latest version: 2.2
  542.     Anonymous FTP:
  543.       Emacs Lisp Archive: packages/sc-2.2.tar.Z
  544.     Via e-mail:
  545.       To: library@cme.nist.gov
  546.       Subject: help
  547.   
  548.     NOTE: Superyank is an old version of SuperCite.
  549.   
  550.   * GNUS -- news reader within Emacs
  551.   
  552.     Author: Masanobu Umeda <umerin@mse.kyutech.ac.jp>
  553.     Latest official version: 3.13
  554.     Unofficial test version: 3.14.1
  555.     Anonymous FTP:
  556.       cs.umn.edu:pub/gnu/emacs/gnus-3.14.1.tar.Z.
  557.       aun.uninett.no:pub/gnus-3.14.1.tar.Z
  558.       wnoc-fuk.wide.ad.jp:pub/GNU/etc/gnus-3.14.1.tar.Z
  559.       liasun3.epfl.ch:pub/gnu/emacs/gnus-3.14.1.tar.Z
  560.       aix370.rrz.uni-koeln.de:/pub/gnu/emacs/gnus-3.14.1.tar.Z
  561.       funet.fi:/networking/news/gnus-3.14.1.tar.Z
  562.       src.doc.ic.ac.uk:/gnu/EmacsBits/gnus/gnus-3.14.1.tar.Z
  563.       Emacs Lisp Archive: packages/gnus-3.13.tar.Z
  564.     Newsgroups and mailing lists:
  565.       English-only:    
  566.         gnu.emacs.gnus
  567.         info-gnus-english-request@cis.ohio-state.edu (for subscriptions)
  568.         info-gnus-english@cis.ohio-state.edu
  569.       Japanese (and some English):
  570.         info-gnus-request@flab.fujitsu.co.jp (for subscriptions)
  571.         info-gnus@flab.fujitsu.co.jp
  572.   
  573.   * Calc -- poor man's Mathematica within Emacs
  574.   
  575.     Author: Dave Gillespie <daveg@csvax.cs.caltech.edu>
  576.     Latest released version: 2.01
  577.     Anonymous FTP:
  578.       csvax.cs.caltech.edu:pub/calc-2.01.tar.Z
  579.     WARNING: Calc 2.00 can trigger a bug causing an infinite memory
  580.       allocation loop trying to copy a recursive keymap.  Change
  581.       (copy-keymap esc-map) to (copy-sequence esc-map) to work around it.  
  582.     NOTE: Unlike Wolfram Research, Dave has never threatened to sue anyone   +
  583.       for having a program with a similar command language to Calc.  :-)     +
  584.   
  585.   * Calendar/Diary -- calendar manager within Emacs
  586.   
  587.     Author: Ed Reingold <reingold@cs.uiuc.edu>
  588.     Latest version: 4.01
  589.     Anonymous FTP:
  590.       emr.cs.uiuc.edu:/pub/emacs/calendar
  591.     Via e-mail:
  592.       To: reingold@cs.uiuc.edu
  593.       Subject: send-emacs-cal
  594.       Put your best internet e-mail address in the body.
  595.   
  596.   * Ange-FTP -- adds transparent FTP access to Emacs's file access routines
  597.   
  598.     Author: Andy Norman <ange@hplb.hpl.hp.com>
  599.     Latest version: 3.143
  600.     Anonymous FTP:
  601.       ftp.gnu.ai.mit.edu:ange-ftp/ange-ftp.el.Z
  602.       Emacs Lisp Archive:
  603.         as-is/ange-ftp.el.Z (current version)
  604.     packages/ange-ftp.el.Z (old version)
  605.     Mailing list: ange-ftp-lovers-request@anorman.hpl.hp.com (subscription)
  606.                   ange-ftp-lovers@anorman.hpl.hp.com
  607.     NOTE: now with support for accessing VMS systems
  608.   
  609.   * VIP -- vi emulation for Emacs
  610.   
  611.     Latest released version: 4.3
  612.     Author: Aamod Sane <sane@cs.uiuc.edu>
  613.     Anonymous FTP:
  614.       cs.uiuc.edu:pub/vip4.3.tar.Z
  615.       Emacs Lisp Archive: modes/vip-mode.tar.Z
  616.     NOTE: This version much more closely emulates vi than the one
  617.       distributed with Emacs.
  618.   
  619.     Version distributed with Emacs: 3.5
  620.     Author: Masahiko Sato <ms@sail.stanford.edu,
  621.                            masahiko@sato.riec.tohoku.junet>
  622.   
  623.   * Dired -- directory editor for Emacs
  624.   
  625.     Author: Sebastian Kremer <sk@thp.uni-koeln.de>
  626.     Anonymous FTP: ftp.cs.buffalo.edu:pub/Emacs/incoming/diredall.tar.Z
  627.            ftp.cs.buffalo.edu:pub/Emacs/diredall.tar.Z
  628.            ftp.thp.uni-koeln.de:pub/gnu/emacs/diredall.tar.Z
  629.     NOTE: This is a huge improvement over the Dired distributed with Emacs.
  630.       This version will be in Emacs 19.
  631.   
  632.   * Ispell -- spell checker in C with interface for Emacs
  633.   
  634.     Author: Geoff Kuenning <geoff@itcorp.com> (latest of many)
  635.     Latest released version: 2.0.02
  636.     Beta test version: 3.0 (9 patches)                                       !
  637.     Anonymous FTP:
  638.       archive.cis.ohio-state.edu:/pub/gnu/ispell/* (version 2.0.02)
  639.       ftp.cs.ucla.edu:/pub/ispell/* (version 3.0, patches, dictionaries)
  640.     NOTE: Do not send mail to Geoff asking him to send you the latest        +
  641.       version of Ispell.  He does not have free e-mail.                      +
  642.   
  643.   * Epoch -- enhanced GNU Emacs with better X interface
  644.   
  645.     Latest released version: 3.2
  646.     Alpha test version: 4.0a3                                                !
  647.     Anonymous FTP:
  648.       cs.uiuc.edu:pub/epoch-files/epoch/epoch-4.0a0.tar.Z
  649.       cs.uiuc.edu:pub/epoch-files/epoch/epoch-3.2{.tar.Z,-patch-{1,2.tar.Z}}
  650.     Newsgroup and mailing list:
  651.       gnu.emacs.epoch
  652.       epoch-request@cs.uiuc.edu (for subscriptions)
  653.       epoch@cs.uiuc.edu
  654.   
  655.   * Demacs -- GNU Emacs altered to work under MS-DOS on 386 and 486 machines
  656.   
  657.     Authors: Manabu Higashida <manabu@sigmath.osaka-u.ac.jp>
  658.          HIRANO Satoshi <hirano@tkl.iis.u-tokyo.ac.jp>
  659.     Latest released version: 1.2.0
  660.     Anonymous FTP:
  661.       utsun.s.u-tokyo.ac.jp:GNU/demacs/* (nearest to U.S.A.)
  662.       ftp.sigmath.osaka-u.ac.jp:pub/Msdos/Demacs/*
  663.       wnoc-fuk.wide.ad.jp:pub/msdos/Demacs/*
  664.       ftp.uni-koeln.de: (PLEASE USE ONLY OUTSIDE WORKING HOURS!)             +
  665.         msdos/gnuprogs/dem120e.zip (executables, lisp-code, doc)             +
  666.         msdos/gnuprogs/dem120s.zip (sources, diffs)                          +
  667.       ftp.lysator.liu.se:pub/msdos/gnu/emacs/?????????????                   +
  668.     Downloading:                                                             +
  669.       EXEC-PC (Milwaukee, WI) 414-789-4210 (2400 bps)                        +
  670.         in the Mahoney MS-DOS file area in its Editors/wordprocessors        +
  671.         library (F), named GNUEMACS.ZIP                                      +
  672.       Channel 1 (Cambridge, MA) 617-345-8873 (9600 bps)                      +
  673.         in the New Uploads file area, named GNUEMACS.ZIP                     +
  674.     NOTE: Use the -d option of [pk]unzip for all .zip archives.  Some sites  +
  675.       have Demacs lharc'ed.  {Can anyone tell me FTP sites for programs to   +
  676.       extract lharc and zip format files?  Or even better, give me a pointer +
  677.       to another FAQ that answers these questions.}                          +
  678.   
  679.   * Freemacs -- a small Emacs for MS-DOS
  680.   
  681.     Latest released version: 1.6a
  682.     Anonymous FTP:
  683.       simtel20.army.mil:PD:<MSDOS.FREEMACS>*
  684.       grape.ecs.clarkson.edu:pub/msdos/freemacs/*
  685.     Via e-mail:
  686.       To: archive-server@sun.soe.clarkson.edu
  687.       body: help
  688.     Via snail mail:
  689.       address: Russell Nelson, 11 Grant St., Potsdam, NY 13676
  690.       Send $15 copying fee, and specify preferred floppy disk format:
  691.         5.25", 360K, or 3.50", 720K
  692.     Mailing lists: 
  693.       Subscriptions:
  694.         To: listserv@sun.soe.clarkson.edu
  695.         body: add <your-address> <name-of-list>
  696.         or put "help" in the body.
  697.       List distribution addresses:
  698.     freemacs-announce@sun.soe.clarkson.edu
  699.     freemacs-help@sun.soe.clarkson.edu
  700.     freemacs-workers@sun.soe.clarkson.edu (send bug reports here)
  701.   
  702.   * Patch -- program to apply "diffs" for updating files
  703.   
  704.     Author: Larry Wall <lwall@netlabs.com>
  705.     Latest version: 2.0 patchlevel 12u5                                      !
  706.       (This is the version that supports the new "unified" diff format.)
  707.     Anonymous FTP:
  708.       prep.ai.mit.edu:pub/gnu/patch-2.0.12u4.tar.Z
  709.   
  710. 22: What is the real legal meaning of the GNU copyleft?
  711.   
  712.   RMS writes:
  713.   
  714.     The legal meaning of the GNU copyleft is less important than the spirit,
  715.     which is that Emacs is a free software project and that work pertaining
  716.     to Emacs should also be free software.  "Free" means that all users have
  717.     the freedom to study, share, change and improve Emacs.  To make sure
  718.     everyone has this freedom, pass along source code when you distribute
  719.     any version of Emacs or a related program, and give the recipients the
  720.     same freedom that you enjoyed.
  721.   
  722.     If you still want to find out about the legal meaning of the copyleft,
  723.     please ask yourself if this means you are not paying attention to the
  724.     spirit.
  725.   
  726. 23: What are appropriate messages for gnu.emacs.help, gnu.emacs.bug,         !
  727.  comp.emacs, etc.?                                                           +
  728.   
  729.   The file etc/MAILINGLISTS discusses the purpose of each GNU
  730.   mailing-list.  (See question 20 on how to get a copy.)  For
  731.   those which are gatewayed with newsgroups, it lists both the newsgroup
  732.   name and the mailing list address.
  733.   
  734.   comp.emacs is for discussion of Emacs programs in general.  This
  735.   includes GNU Emacs along with various other implementations like JOVE,
  736.   MicroEmacs, Freemacs, MG, Unipress, CCA, Epsilon, etc.
  737.   
  738.   Many people post GNU Emacs questions to comp.emacs because they don't
  739.   receive any of the gnu.* newsgroups.  Arguments have been made both for
  740.   and against posting GNU-Emacs-specific material to comp.emacs.  You have
  741.   to decide for yourself.
  742.   
  743.   Messages advocating "non-free" software are considered unacceptable on any +
  744.   of the gnu.* newsgroups except for gnu.misc.discuss, which was created to  +
  745.   hold the extensive flame-wars on the subject.  "non-free" software         +
  746.   includes any software for which the end user can't get source code.  Be    +
  747.   careful to remove the gnu.* groups from the "Newsgroups:" line when        +
  748.   posting a followup that recommends such software.                          +
  749.                                                                              +
  750.   The correct place to report GNU Emacs bugs is by e-mail to                 +
  751.   bug-gnu-emacs@prep.ai.mit.edu.  Anything sent here also appears in the     +
  752.   newsgroup gnu.emacs.bug, but please use e-mail instead of news to submit   +
  753.   the bug report.  This way a reliable return address is available so you    +
  754.   can be contacted for further details.                                      +
  755.                                                                              +
  756.   RMS writes:                                                                +
  757.                                                                              +
  758.     Sending bug reports to help-gnu-emacs (which has the effect of posting   +
  759.     on gnu.emacs.help) is undesirable because it takes the time of an        +
  760.     unnecessarily large group of people, most of whom are just users and     +
  761.     have no idea how to fix these problem.  bug-gnu-emacs reaches a much     +
  762.     smaller group of people who are more likely to know what to do and have  +
  763.     expressed a wish to receive more messages about Emacs than the others.   +
  764.                                                                              +
  765.   If you are unsure whether you have a bug, RMS explains further:            +
  766.                                                                              +
  767.     ... if Emacs crashes, that is a bug.  If Emacs gets compilation errors   +
  768.     while building, that is a bug.  If Emacs crashes while building, that is +
  769.     a bug.  If Lisp code does not do what the documentation says it does,    +
  770.     that is a bug.                                                           +
  771.   
  772. 24: How do I unsubscribe to this mailing list?
  773.   
  774.   If you are receiving a GNU mailing list named "XXX", you might be able
  775.   to unsubscribe to it by sending a request to the address
  776.   "XXX-request@prep.ai.mit.edu".  However, this will not work if you are
  777.   not listed on the main mailing list, but instead recieve the mail from a
  778.   distribution point.  In that case, you will have to track down at which
  779.   distribution point you are listed.  Inspecting the "Received:" headers
  780.   on the mail messages may help, along with liberal use of the "EXPN" or
  781.   "VRFY" sendmail commands through "telnet <site-address> smtp".  Ask your
  782.   postmaster for help.
  783.   
  784. 25: What is the LPF and why should I join it?
  785.   
  786.   The LPF opposes the expanding danger of software patents and
  787.   look-and-feel copyrights.  Write to league@prep.ai.mit.edu for more
  788.   information.  You can get papers describing the LPF's views via
  789.   anonymous FTP (prep.ai.mit.edu:/pub/lpf/*) or via anonymous UUCP
  790.   (osu-cis!~/lpf/*).
  791.   
  792. 26: What is the current address of the FSF?
  793.   
  794.   Snail mail address:
  795.     Free Software Foundation, Inc.
  796.     675 Massachusetts Avenue
  797.     Cambridge, MA 02139, USA
  798.   
  799.   Phone number:
  800.     (617) 876-3296
  801.   
  802.   E-mail addresses:
  803.     gnu@prep.ai.mit.edu                                                      -
  804.   
  805. 27: What is the current address of the LPF?
  806.   
  807.   Snail mail address:
  808.     League for Programming Freedom
  809.     1 Kendall Square, Number 143
  810.     Post Office Box 9171
  811.     Cambridge, MA 02139, USA
  812.   
  813.   Phone number:
  814.     (617) 243-4061 { or 243-4091, I'm not sure ... }
  815.     {Will someone please tell me which of the above numbers is correct?}     +
  816.   
  817.   E-mail address:
  818.     league@prep.ai.mit.edu
  819.   
  820. 28: Where can I get other up-to-date GNU stuff?
  821.   
  822.   The most up-to-date official GNU stuff is normally kept on
  823.   prep.ai.mit.edu and is available for anonymous FTP.  See the files
  824.   etc/DISTRIB and etc/FTP for more information.  (To get copies of these
  825.   files, see question 20.)
  826.   
  827.   For Europeans, the site nic.funet.fi duplicates the directory /pub/gnu
  828.   from prep.ai.mit.edu.
  829.   
  830. 29: Where can I get the latest version of this document (the FAQ list)?
  831.   
  832.   The GNU Emacs FAQ is available in several ways:
  833.   
  834.   1. If you can read news, the FAQ should be available in your news spool,
  835.      in both the "gnu.emacs.help" and "comp.emacs" newsgroups.  Every news
  836.      reader of which I know will allow you to read any news article that is
  837.      still in the news spool, even if you have read the article before.  You
  838.      may need to read the instructions for your news reader to discover how
  839.      to do this.  In "rn", this command will do this for you at the "article
  840.      selection level":
  841.   
  842.        ?GNU Emacs FAQ?rc:m                                                   !
  843.   
  844.      In GNUS, you should type "C-u G" from the *Subject* buffer or "C-u SPC"
  845.      from the *Newsgroup* buffer to view all articles in a newsgroup.
  846.   
  847.      The FAQ articles' message IDs are:                                      +
  848.                                                                              +
  849.        <JBW.92Jan21180505@bigbird.bu.edu>                                    +
  850.        <JBW.92Jan21180506@bigbird.bu.edu>                                    +
  851.        <JBW.92Jan21180507@bigbird.bu.edu>                                    +
  852.                                                                              +
  853.      If you are viewing this in the GNUS `*Article*' buffer, you can move    +
  854.      point within one of the above message IDs and type "r" to fetch the     +
  855.      referenced article into the `*Article*' buffer.  Type "o" in the        +
  856.      `*Article*' buffer to restore the previous contents of the `*Article*'  +
  857.      buffer.  If you are not viewing this in the GNUS `*Article*' buffer,    +
  858.      use M-x gnus-Article-refer-article instead of "r".  GNUS must be        +
  859.      running and you must display the `*Article*' buffer to see the results. +
  860.   
  861.      If the FAQ articles have expired and been deleted from your news spool,
  862.      it might (or might not) do some good to complain to your news
  863.      administrator, because the most recent FAQ should not expire before
  864.      February 15, 1992.                                                      !
  865.   
  866.   2. You can fetch the FAQ articles via anonymous FTP (pit-manager.mit.edu: 
  867.      /pub/usenet/gnu.emacs.help/*).
  868.   
  869.   3. You can send the following magical incantation in the body of a message
  870.      to mail-server@pit-manager.mit.edu:
  871.   
  872.        send usenet/gnu.emacs.help/GNU_Emacs_FAQ:_Questions_(part_1_of_3)
  873.        send usenet/gnu.emacs.help/GNU_Emacs_FAQ:_Questions_(part_2_of_3)
  874.        send usenet/gnu.emacs.help/GNU_Emacs_FAQ:_Questions_(part_3_of_3)
  875.   
  876.   4. If you can use WAIS, the FAQ articles are available from the "usenet"
  877.      database on pit-manager.mit.edu (on the standard IP port: 210).
  878.   
  879.   5. Since GNU Emacs 18.56, the latest available version of the FAQ at the
  880.      time of release has been part of the GNU Emacs distribution as file
  881.      etc/FAQ.  18.57 is the latest version, and it was released in January
  882.      1991.
  883.  
  884.  
  885. GNU Emacs and Various Computing Environments
  886.  
  887. 30: Where does the name "Emacs" come from?
  888.   
  889.   EMACS originally was an acronym for Editor MACroS.  The first Emacs was
  890.   a set of macros written by Richard Stallman and Guy Steele for the
  891.   editor TECO (Text Editor and COrrector (originally Tape Editor and
  892.   COrrector)) on a PDP-10.  (Amusing fact: many people have told me that
  893.   TECO code looks a lot like line noise.  See alt.lang.teco if you are
  894.   interested.)
  895.   
  896. 31: What is the latest version of GNU Emacs?
  897.   
  898.   From the June 1991 GNU's Bulletin:
  899.   
  900.     GNU Emacs 18.57 is the current version.  The undo facility has been
  901.     completely rewritten and now holds unlimited data temporarily, and a
  902.     user-specified amount for the long term.
  903.   
  904.     Berkeley is distributing GNU Emacs with the 4.3 BSD distribution, and
  905.     numerous companies distribute it also.
  906.   
  907.     Emacs 18 maintenance continues for simple bug fixes.
  908.   
  909.   There have been three pretest releases of Emacs 18.58 this fall.  As could !
  910.   be expected, it will be a bug fix release when it comes out.  RMS was      !
  911.   looking for pretesters who would actively test and fix 18.58 or who had    !
  912.   unusual machines.                                                          !
  913.   
  914. 32: When will GNU Emacs 19 be available?
  915.   
  916.   Good question, I don't know.  For that matter, neither do the developers.
  917.   It will undoubtedly be available sometime in the 1990s.  :-)  People are
  918.   actually using alpha-test version of Emacs 19, which is a good sign.  Work
  919.   has begun on features for Emacs 20.
  920.   
  921.   RMS writes:
  922.   
  923.     Work is progressing steadily on 19 and it the to-do list is getting
  924.     smaller.  But I don't want to make the mistake of predicting when it
  925.     will be ready.
  926.   
  927. 33: What will be different about GNU Emacs 19?
  928.   
  929.   From the June 1991 GNU's Bulletin:
  930.   
  931.     Version 19 approaches release, counting among its new features: before
  932.     and after change hooks, source-level debugging of Emacs Lisp programs, X
  933.     selection processing (including clipboard selections), scrollbars,
  934.     support for European character sets, floating point numbers, per-buffer
  935.     mouse commands, X resource manager interfacing, mouse-tracking,
  936.     Lisp-level binding of function keys, multiple X windows (`screens' to
  937.     Emacs), a new input system---all input now arrives in the form of Lisp
  938.     objects---and buffer allocation, which uses a new mechanism capable of
  939.     returning storage to the system when a buffer is killed.
  940.   
  941.     Thanks go to Alan Carroll and the people who worked on Epoch for
  942.     generating initial feedback to a multi-windowed Emacs.  Emacs 19
  943.     supports two styles of multiple windows, one with a separate screen for
  944.     the minibuffer, and another with a minibuffer attached to each screen.
  945.   
  946.     Features being considered for later releases of Emacs include:
  947.     associating property lists with regions of text in a buffer; multiple
  948.     fonts, color, and pixmaps defined by those properties; different
  949.     visibility conditions for the regions, and for various windows showing
  950.     one buffer; hooks to be run if point or mouse moves outside a certain
  951.     range; incrementally saving undo history in a file; static menu bars;
  952.     and better pop-up menus.
  953.   
  954.   Mention of these two items disappeared in the January 1991 GNU's bulletin:
  955.   
  956.   * Incremental syntax analysis for various programming languages (Leif).
  957.   * A more sophisticated emacsclient/server model, which would provide
  958.     network transparent Emacs widget functionality.
  959.   
  960. 34: Is there an Emacs that has better mouse and X window support?
  961.   
  962.   Emacs 18 has some limited X Window System support, but there are
  963.   problems.  Emacs 19 will have amazing mouse and window support.  Right
  964.   now, there is a modified version of Emacs 18.55 called "Epoch" which has
  965.   greatly improved mouse and window support.  To obtain Epoch, see
  966.   question 21.
  967.   
  968.   There are numerous Emacs Lisp packages that have been written to extend
  969.   Emacs 18's mouse handling capabilities.  Some of these packages also have  +
  970.   patches to the C code to provide enhanced capabilities.  Look up "mouse"   +
  971.   in the Lisp Code Directory (see question 17).
  972.   
  973.   NOTE: Epoch only works with the X Window System; it does not work on
  974.   ordinary terminals.
  975.   
  976. 35: Where can I get the "unofficial HP GNU Emacs"?
  977.   
  978.   The unofficial HP GNU Emacs is available via anonymous FTP
  979.   (me10.lbl.gov:pub/interex/HUGE/HUGE.{README.HP,tar.Z.??},
  980.   ee.utah.edu:HUGE/*, PLEASE FTP DURING NON-WORK HOURS!!!) and takes about
  981.   35 megabytes of disk space to build.  It is useful for non-HP machines,
  982.   but some of the added features will only work under HP-UX.
  983.   
  984.   You will need to get patches to work with HP-UX 8.0 or on 700 series       +
  985.   machines via e-mail from Darryl Okahata <darrylo@sr.hp.com>.               +
  986.   
  987. 36: Where can I get Emacs for my PC?
  988.   
  989.   ** Demacs
  990.   
  991.   For 386 or 486 PCs, there is a version of GNU Emacs called Demacs.  To get
  992.   Demacs see question 21.
  993.   
  994.   From the announcement message:
  995.   
  996.     Demacs is almost a full set of GNU Emacs but does not support some
  997.     features: asynchronous process, locking a file, etc.
  998.   
  999.     Demacs provides following DOS specific features:
  1000.   
  1001.       * File type: text or binary file translation.
  1002.       * "8bit clean" display mode.
  1003.       * 8086 software interrupt call by int86 lisp function.
  1004.       * Machine specific features such as function key support.
  1005.       * File name completion with drive name.
  1006.       * Child process (suspend-emacs, call-process).
  1007.       * Enhanced dired mode which can work without 'ls.exe'.
  1008.   
  1009.     To our regret `shell-mode' does not work, but `compile' command works
  1010.     properly.
  1011.   
  1012.   Demacs was developed using an MS-DOS version of gcc called djgpp by D. J.
  1013.   Delorie <dj@ctron.com> which can compile and run large programs under
  1014.   MS-DOS, but not under MS Windows.  Demacs was derived from Nemacs rather   +
  1015.   than straight from GNU Emacs.                                              +
  1016.   
  1017.   There are a variety of other Emacses for MS-DOS including among them the
  1018.   following.
  1019.   
  1020.   ** Freemacs
  1021.   
  1022.   Russ Nelson <nelson@sun.soe.clarkson.edu>, the author, describes
  1023.   Freemacs:
  1024.   
  1025.     * Freemacs is free, and it was designed from the start to be
  1026.       programmable.
  1027.     * Freemacs is the only IBM-PC editor that tries to be like GNU Emacs.
  1028.     * Freemacs can only edit files less than 64K in length.
  1029.     * Freemacs doesn't have undo.
  1030.   
  1031.   Carl Witty <cwitty@cs.stanford.edu> describes Freemacs:
  1032.   
  1033.     Better is Freemacs, which follows the tradition of ITS and GNU Emacs by
  1034.     having an full, turing-complete extension language which is incompatible
  1035.     with everything else.  In fact, it's even closer to ITS Emacs than GNU
  1036.     Emacs is, because Mint (Freemacs' extension language) is absolutely
  1037.     illegible without weeks of study, much like TECO.
  1038.   
  1039.   To get Freemacs see question 21.
  1040.   
  1041.   ** MicroEmacs
  1042.   
  1043.   MicroEmacs is a descendant of Microemacs.  It is programmable in a
  1044.   BASIC-like language.  The author is Daniel Lawrence <dan@mdbs.uucp,
  1045.   dan@midas.mgmt.purdue.edu, nwd@j.cc.purdue.edu>.  Many of the keybindings
  1046.   are different from GNU Emacs.  The latest version is 3.10 and it is
  1047.   available via anonymous FTP (midas.mgmt.purdue.edu (non-working hours
  1048.   only), durer.cme.nist.gov, wuarchive.wustl.edu:/mirrors/msdos/memacs/*).
  1049.   Version 3.11 is in beta test.
  1050.   
  1051.   ** JOVE
  1052.   
  1053.   Another Emacs for small machines is JOVE (Jonathan's Own Version of
  1054.   Emacs).  The latest official version is 4.14.  There appears to be a newer
  1055.   version.  People rumored to be working on JOVE include Mark Moraes
  1056.   <moraes@cs.toronto.edu> and Bill Marsh <bmarsh@cod.nosc.mil>.  It is
  1057.   available via anonymous FTP (cs.rochester.edu:/pub/jove.tar.4.14.Z,
  1058.   cs.toronto.edu:/pub/moraes/jove4.14.3.tar.Z).
  1059.   
  1060.   ** MG
  1061.   
  1062.   MG is another descendant of Microemacs.  MG used to stand for
  1063.   MicroGNUEmacs, but now just stands for MG.  The current version is rumored
  1064.   to be 2.  There is a version 3 in beta which works on the Amiga.  It is
  1065.   also available via anonymous FTP (ftp.white.toronto.edu:pub/mg/*,
  1066.   wuarchive.wustl.edu: /mirrors/unix-c/editors/mg*, procyon.cis.ksu.edu
  1067.   (source and executable)).
  1068.   
  1069. 37: Where can I get Emacs for my Atari ST?
  1070.   
  1071.   Anonymous FTP:                                                             !
  1072.     cs.uni-sb.de:/pub/atari/emacs/????????                                   !
  1073.   
  1074. 38: Where can I get Emacs for my Amiga?
  1075.   
  1076.   All of the files are lharc-ed.
  1077.   
  1078.   Anonymous FTP:
  1079.     oes.orst.edu:/pub/almanac/comp/amiga/software/gnuemacs-1.10/*
  1080.   
  1081.   Via e-mail:
  1082.     To: almanac@oes.orst.edu:
  1083.     body:
  1084.       mode uuencode
  1085.       send computer amiga software gnuemacs <file>
  1086.     <file> is replaced by one of the following:
  1087.       Required: d1.lzh d2.lzh
  1088.       Recommended: d3_info.lzh d3_infolisp.lzh
  1089.       Optional: d3_autoloaded.lzh d3_entertainmentetc.lzh
  1090.     d3_entertainmentlisp.lzh d4_src.lzh d5_languagelisp.lzh
  1091.     d5_viclone.lzh d6_gnulibsrc.lzh d6_mailpackage.lzh
  1092.     d6_mathpackage.lzh d6_misc.lzh d6_textformat.lzh
  1093.     The `d#' at the beginning of each file is its disk number, which is
  1094.     referred to by the documentation.
  1095.   
  1096. 39: Where can I get Emacs for my Apple computer?
  1097.   
  1098.   The FSF is a participant in a boycott of Apple because of Apple's "look
  1099.   and feel" copyright suits.  See the file etc/APPLE for more details.
  1100.   Because of this boycott, the FSF doesn't include support in GNU software
  1101.   for Apple computers such as the Macintosh.
  1102.   
  1103.   Please don't help people port or develop software for Apple computers.
  1104.   
  1105. 40: Where can I get Emacs with NeWS support?
  1106.   
  1107.   Chris Maio's NeWS support package for GNU Emacs is available via
  1108.   anonymous FTP (columbia.edu:/pub/ps-emacs.tar.Z,
  1109.   archive.cis.ohio-state.edu:/pub/gnu/emacs/ps-emacs.tar.Z).
  1110.   
  1111. 41: How do I get Emacs running on VMS under DECwindows?
  1112.   
  1113.   Hal R. Brand <BRAND@addvax.llnl.gov> is said to have a VMS save set with
  1114.   a ready-to-run VMS version of Emacs 18.55 for X Windows.  It is
  1115.   available via anonymous FTP (addvax.llnl.gov).
  1116.   
  1117.   Johan Vromans <jv@mh.nl> writes:
  1118.   
  1119.     Getting Emacs to run on VMS with DECwindows requires a number of changes
  1120.     to the sources. Fortunately this has been done already.  Joshua Marantz
  1121.     <josh@viewlogic.com> did most of the work for Emacs 18.52, and the mods
  1122.     were ported to 18.55 by Johan Vromans <jv@mh.nl>. Also included is the
  1123.     handling of DEC's LK201 keyboard.  You need to apply the changes to a
  1124.     fresh Emacs 18.55 distribution on a Unix system, and then you can copy
  1125.     the sources to VMS to perform the compile/link/build.
  1126.   
  1127.     The set of changes have been posted a number of times three times the
  1128.     last 12 months, so they should be widely available.
  1129.   
  1130. 42: How do I use emacstool under SunView?
  1131.   
  1132.   The file etc/SUN-SUPPORT includes the document "Using Emacstool with GNU
  1133.   Emacs".  Also read the man page for emacstool (etc/emacstool.1).
  1134.   
  1135. 43: How do I make Emacs display 8-bit characters?
  1136.   
  1137.   There is a patch called the `8-bit ctl-arrow patch' that allows Emacs to
  1138.   display characters with codes from 128 to 255.  {It appears to be by
  1139.   Kenneth Cline <cline@proof.ergo.cs.cmu.edu>.}
  1140.   
  1141.   Anonymous FTP:
  1142.     cs.purdue.edu:pub/ygz/cemacs.tar.Z:cemacs/8bit-patch-18.57
  1143.     sics.se:archive/emacs-18.55-8bit-diff (new version not available)
  1144.     laas.laas.fr:pub/emacs/patch-8bit-18.5{5,7}
  1145.   
  1146.   E-mail:
  1147.     To: mail-server@sics.se
  1148.     body: send emacs-18.55-8bit-diff
  1149.   
  1150.   Anders Edenbrandt <anderse@dna.lth.se> has produced a more comprehensive
  1151.   patch that allows for 8-bit input and output.
  1152.   
  1153.   Anonymous FTP:
  1154.     sics.se:archive/emacs-8bit-diff-lth
  1155.     gatekeeper.dec.com:pub/GNU/DS-emacs-18.57-8bit-diff-lth
  1156.   
  1157.   The most comprehensive patches for 8-bit output are by Howard Gayle, which
  1158.   are for Emacs 18.55.  These patches allow displaying any arbitrary string
  1159.   for a given 8-bit character.  Also supported is defining the sorting order
  1160.   and the uppercase and lowercase translations.  Thomas Bellman
  1161.   <Bellman@lysator.liu.se> is currently updating them for Emacs 18.57, but
  1162.   will probably not be done soon.
  1163.   
  1164.   Anonymous FTP:
  1165.     sics.se:archive/emacs-gayle.tar.Z
  1166.   
  1167. 44: How do I input 8-bit characters?
  1168.   
  1169.   Minor modes for ISO Latin-1 that allow one to easily input this character
  1170.   set have been written by several people.  There is one by Matthieu Herrb
  1171.   <matthieu@laas.fr> (laas.laas.fr:pub/emacs/iso-latin-1.el).  There is also
  1172.   one by Johan Vromans <jv@mh.nl>.
  1173.   
  1174.   These approaches differ from the one taken by Anders Edenbrandt in that
  1175.   his method uses direct 8-bit input, while these methods use a compose      -
  1176.   sequence for 8-bit characters.  {I have heard conflicting reports on       +
  1177.   whether this results in losing the Meta key.  Perhaps this depends on      +
  1178.   whether Emacs is running under X.  Can someone resolve this?}              +
  1179.   
  1180.   Karl Heuer <karl@haddock.ima.isc.com> is accused of having a patch to
  1181.   allow 8-bit input.
  1182.   
  1183. 45: How do I use an already running Emacs from another window?
  1184.   
  1185.   The `emacsclient' program is for editing a file using an already running
  1186.   Emacs rather than starting up a new Emacs.  It does this by sending a
  1187.   request to the already running Emacs, which must have executed the
  1188.   `server-start' function for this to work.  This can be done either by a
  1189.   command line option:
  1190.   
  1191.     emacs -f server-start
  1192.   
  1193.   or by invoking server-start from the .emacs file:
  1194.   
  1195.     (if (some conditions are met) (server-start))
  1196.   
  1197.   When this is done, Emacs starts a subprocess running a program called
  1198.   `server'.  `server' creates a Unix domain socket in the user's home
  1199.   directory named `.emacs_server'.
  1200.   
  1201.   When emacsclient is run, it connects to this socket and passes its command
  1202.   line options to `server'.  emacsclient and server must be running on
  1203.   machines which share the same filesystem for this to work.  The pathnames
  1204.   that emacsclient specifies should be correct for the filesystem that the
  1205.   Emacs process sees, which is not necessarily the same as the one the
  1206.   emacsclient sees.
  1207.   
  1208.   When `server' receives these requests, it sends this information on the
  1209.   the Emacs process, which at the next opportunity will visit the files
  1210.   specified.  (Line numbers can be specified just like with Emacs.)  When
  1211.   the user is done editing a file, the user can type "C-x #" to indicate
  1212.   this.  This will switch to another buffer created at the request of
  1213.   emacsclient if there are any.  When "C-x #" has been invoked on all of the
  1214.   files that the emacsclient requested to be edited, Emacs will send
  1215.   notification of this to `server' which will pass this on to the
  1216.   emacsclient, which will then exit.
  1217.   
  1218.   There is an enhanced version of emacsclient/server called gnuserv by Andy
  1219.   Norman <ange@hplb.hpl.hp.com> which is available in the Emacs Lisp
  1220.   Archive.  gnuserv uses Internet domain sockets, so it can work across most
  1221.   network connections.  It also supports the execution of arbitrary Emacs
  1222.   Lisp forms, not just the ability to visit files.  It is available via      +
  1223.   anonymous FTP (Emacs Lisp Archive: packages/gnuserv.shar).                 +
  1224.   
  1225. 46: How do I use emacsclient from news, mail, etc.?
  1226.   
  1227.   Set the environment variable EDITOR (or sometimes VISUAL) to the value
  1228.   `emacsclient'.  You may have to specify the full pathname of the
  1229.   emacsclient program instead.  Examples:
  1230.   
  1231.     # csh commands:
  1232.     setenv EDITOR emacsclient
  1233.     setenv EDITOR /usr/local/emacs/etc/emacsclient  # using full pathname
  1234.   
  1235.     # sh command:
  1236.     EDITOR=emacsclient export EDITOR
  1237.   
  1238. 47: Where can I get an Emacs that can handle kanji characters?
  1239.   
  1240.   Nemacs 3.3.2 (Nihongo GNU Emacs) is a modified version of GNU Emacs 18.55
  1241.   that handles kanji characters.  It is available via anonymous FTP
  1242.   (crl.nmsu.edu:pub/misc/nemacs-3.3.2.tar.Z, uhccux.uhcc.hawaii.edu:
  1243.   editors/Nemacs-3.3.2/*, miki.cs.titech.ac.jp:
  1244.   JAPAN/nemacs/nemacs-3.3.2.tar.Z).  You might also need files for "wnn", a
  1245.   kanji input method (wnn-4.0.3{-README,.tar.Z} {on which machine?}).
  1246.   
  1247. 48: Where can I get an Emacs that can handle Chinese?
  1248.   
  1249.   `cemacs' by Stephen G. Simpson <simpson@math.psu.edu> is a patch to Emacs
  1250.   18.57 (the ctl-arrow patch) and some Emacs Lisp code that combined with
  1251.   Cxterm allows using Chinese characters.  It is available via anonymous FTP
  1252.   (crl.nmsu.edu:pub/chinese/cemacs.tar.Z, cs.purdue.edu:
  1253.   pub/ygz/cemacs.tar.Z).  Cxterm is available from the same place
  1254.   (cs.purdue.edu: pub/ygz/cxterm-11.5.1.tar.Z).
  1255.   
  1256. 49: Where is an Emacs that can handle Semitic (right-to-left) alphabets?
  1257.   
  1258.   Joel M. Hoffman <joel@wam.umd.edu> writes:
  1259.   
  1260.     A couple of years ago a wrote a hebrew.el file that allows right-to-left
  1261.     editing of Hebrew.  I relied on the hardware to display the Hebrew
  1262.     letters, given the right codes, but not for any right-to-left support;
  1263.     the hardware also doesn't have to send any specific char. codes.  Emacs
  1264.     keeps track of when the user is typing Hebrew vs. English.  (The VT-*
  1265.     terminals in Israel contain built-in support for Hebrew.)
  1266.   
  1267.     To get it to work I had to modify only a few lines of GNU Emacs's source
  1268.     code --- just enough to make it 8-bit clean.
  1269.   
  1270.     [and in a separate message:]
  1271.   
  1272.     It doesn't produce time-order ["sefer" format] (I wouldn't recommend
  1273.     trying that with emacs, because converting time-order to screen-order
  1274.     with arbitrarily long lines is a bit tricky), but I also concocted a
  1275.     quick filter to convert screen-order into time-order.  I'll be happy to
  1276.     send you the requisite files if you want them.  If you're using it for
  1277.     anything large, however, you'll want something that works better.
  1278.   
  1279.   Joseph Friedman <yossi@Neon.Stanford.EDU> wrote something for Emacs that
  1280.   provides Hebrew support under X Windows.
  1281.   
  1282.   Warren Burstein <warren@itex.jct.ac.il> says he has mapped 7-bit keys by
  1283.   modifying self-insert-command "for Hebrew input on 7-bit keyboards".
  1284.   
  1285.   A good suggestion is to query archie for files named with "hebrew".
  1286.   
  1287.  
  1288.  
  1289. Binding Keys to Commands
  1290.  
  1291. 50: Why does Emacs say "Key sequence XXX uses invalid prefix characters"?
  1292.   
  1293.   Most likely, it failed because the key sequence you were binding started
  1294.   with "ESC [" and this sequence was already bound to a command.  Evaluate
  1295.   this form first:
  1296.   
  1297.     (define-key esc-map "[" nil)
  1298.   
  1299.   WARNING: By default, "ESC [" is bound to backward-paragraph, and if you
  1300.   do this you will lose this key binding.  For most people, this is not a
  1301.   problem.
  1302.   
  1303. 51: Why doesn't this [terminal or window-system setup] code work in my
  1304.  .emacs file, but it works just fine after Emacs starts up?
  1305.   
  1306.   This is because you're trying to do something in your .emacs file that
  1307.   needs to be postponed until after the terminal/window-system setup code
  1308.   is loaded.  This is a result of the order in which things are done
  1309.   during the startup of Emacs.  For more details see question 65.            +
  1310.   
  1311.   In order to postpone the execution of Emacs Lisp code until after the
  1312.   terminal/window-system setup, set the value of the variable
  1313.   term-setup-hook or window-setup-hook to be a function which does what
  1314.   you want.
  1315.   
  1316.   See etc/OPTIONS for a complete explanation of what Emacs does every time
  1317.   it is started.
  1318.   
  1319.   Here is a simple example of how to set term-setup-hook:
  1320.   
  1321.     (setq term-setup-hook
  1322.       (function
  1323.        (lambda ()
  1324.          (cond ((string-match "\\`vt220" (or (getenv "TERM") ""))
  1325.             ;; Make vt220's "Do" key behave like M-x:
  1326.             (define-key CSI-map "29~" 'execute-extended-command))
  1327.            ))))
  1328.   
  1329. 52: Other than that, why does my key binding fail?
  1330.   
  1331.   One possible reason that I've seen many times is improperly specifying
  1332.   the character ESC in the key binding string.  In an Emacs Lisp string,
  1333.   ESC is specified as "\e".  (ESC can also be specified as itself, the
  1334.   ASCII character with value 27, but this can cause serious problems when
  1335.   you try to print/view/mail the file.)  Thus, for example, to bind the
  1336.   key sequence "ESC O D" to the command 'my-backward-char, the simplest
  1337.   incantation is this:
  1338.   
  1339.     (global-set-key "\eOD" 'my-backward-char)
  1340.   
  1341.   These are also correct (and represent what the above command actually
  1342.   does):
  1343.   
  1344.     (define-key global-map "\eOD" 'my-backward-char)
  1345.     (define-key esc-map "OD" 'my-backward-char)
  1346.   
  1347.   The string forms for the keys RET, LFD, DEL, ESC, SPC, and TAB are
  1348.   respectively "\r", "\n", "\C-?", "\e", " ", and "\t".
  1349.   
  1350. 53: How do I use function keys under X Windows?
  1351.   
  1352.   This depends on whether you are running Emacs inside a terminal emulator
  1353.   window, or whether you are allowing Emacs to create its own X window.
  1354.   You can tell which you are doing by noticing whether Emacs creates a new
  1355.   window when you start it.
  1356.   
  1357.   If you are running Emacs inside a terminal emulator window, then it
  1358.   behaves exactly as it does on any other tty.  In this case, for function
  1359.   keys to be useful, they must generate character sequences that are sent
  1360.   to the programs running inside the window as input.  The "xterm" program
  1361.   has two different sets of character sequences that it generates when
  1362.   function keys are pressed, depending on the sunFunctionKeys X resource
  1363.   and the -sf and +sf command line options.  (To find out what these key
  1364.   sequences are, see question 54.)  In addition, with xterm,
  1365.   you can override what key sequence a specific function key (or any other
  1366.   key) will generate with the "translations" resource.  This, for example:
  1367.   
  1368.     XTerm.VT100.Translations: #override \
  1369.       <KeyPress>F1: string(0x1b) string("[xyzzy")
  1370.   
  1371.   makes the function key F1 generate the character sequence "ESC [xyzzy".
  1372.   
  1373.   On the other hand, if Emacs is managing its own X window, the following
  1374.   description applies.  Emacs receives `KeyPress' events from the X server   -
  1375.   when a key is pressed while the keyboard focus is in its window.  The
  1376.   KeyPress event contains an X `keysym' code, which is simply an arbitrary
  1377.   number corresponding to the name of the keysym, and information on which   +
  1378.   "modifiers" such as `control' and `shift' are active.  For example, the    +
  1379.   `Tab' keysym is 0xff09.  (Generally, a key on the keyboard will generate a +
  1380.   keysym whose name is the same as the label on the key, ie. the `Tab' key   +
  1381.   will normally generate the `Tab' keysym.  This can be changed with the     +
  1382.   xmodmap program.)  Emacs recognizes all the keysyms that correspond to     +
  1383.   standard ASCII characters and internally uses the ASCII character instead.
  1384.   
  1385.   (WARNING: I am about to describe a gross, disgusting hack to you, have
  1386.   your barf bag ready.)
  1387.   
  1388.   When Emacs receives the X keysym of one of the arrow keys, it behaves
  1389.   the same as if it had received a letter key with the control modifier
  1390.   down as follows (this is hard-coded):
  1391.   
  1392.     Up    becomes C-p
  1393.     Down  becomes C-n
  1394.     Right becomes C-f
  1395.     Left  becomes C-b
  1396.   
  1397.   The way Emacs treats other keysyms depends on what kind of machine it was
  1398.   compiled on.  Function keys are mapped internally to escape sequences,     !
  1399.   while other keys are completely ignored.                                   !
  1400.                                                                              !
  1401.   1. If compiled on a Sun, Emacs recognizes these X keysyms that             !
  1402.      are normally on a Sun keyboard:
  1403.   
  1404.        F1 through F9
  1405.        L1 through L10 (same as F11 through F20)
  1406.        R1 through R15 (same as F21 through F35)
  1407.      (The keys labelled R8, R10, R12, and R14 usually are bound to the X
  1408.       keysyms Up, Left, Right, and Down.)
  1409.        Break (the "Alternate" key is given this keysym)
  1410.   
  1411.      These keys work like Sun function keys.  When Emacs recieves the
  1412.      keysym, it will internally use character sequences that look like "ESC
  1413.      [ ### z", where ### is replaced by a number.  The character sequences
  1414.      are identical to those generated by Sun's keyboard under SunView.  Any
  1415.      function key not listed above generates "ESC [ - 1 z".
  1416.   
  1417.      In order to use these key sequences, they should be bound to commands   !
  1418.      using the standard key binding methods, just as if Emacs were running   !
  1419.      on a regular terminal.                                                  !
  1420.                                                                              !
  1421.      WARNING: F11 and L1 are the same keysym in X, as are F12 and L2, etc.   !
  1422.      {Yes, this is stupid.  Complain to the X consortium.}                   !
  1423.                                                                              !
  1424.   2. If not compiled on a Sun, the function keys will appear to Emacs in a   !
  1425.      way remarkably similar to the keys of a DEC LK201 keyboard (used on
  1426.      some VT series terminals).  These X keysyms will be recognized:
  1427.   
  1428.        F1 through F20
  1429.        Help (treated same as F15)
  1430.        Menu (treated same as F16, is the LK201 "Do" key)
  1431.        Find
  1432.        Insert (LK201 "Insert Here" key)
  1433.        Select
  1434.   
  1435.      These keysyms are supposed to be recognized, but they are not due to a
  1436.      bug:
  1437.   
  1438.        Prior (LK201 "Prev Screen" key)
  1439.        Next (LK201 "Next Screen" key)
  1440.   
  1441.      And finally, the LK201 key labelled `Remove' (or `Delete') is normally
  1442.      bound to the Delete keysym which generates the DEL character (C-?)
  1443.      instead of the key sequence given by the LK201 `Remove' key.
  1444.   
  1445.      Each function key will be internally converted to a character sequence
  1446.      that looks like "ESC [ ## ~", where ## is replaced by a number.  The
  1447.      character sequences are identical to those generated by a LK201
  1448.      keyboard.  Any function key not listed above generates "ESC [ - 1 ~".
  1449.   
  1450.   For the complete list of the numbers which are generated by the function
  1451.   keys, look in the file src/x11term.c at the definitions of the function
  1452.   "stringFuncVal".
  1453.   
  1454.   If you are running Emacs on a Sun machine, even if your X display is
  1455.   running on a non-Sun machine (eg., an X terminal), you get the setup
  1456.   described above for Suns.  The determining factor is what type of
  1457.   machine Emacs is running (was compiled) on, not what type of machine
  1458.   your X display is on.  You can use "xmodmap" to change your X keysym
  1459.   assignments to get keys listed above, but that may screw up other
  1460.   programs.  X resources are not used by Emacs to affect the key sequences
  1461.   generated.
  1462.   
  1463.   If you have function keys not listed above and you don't want to use
  1464.   xmodmap to change their names, you might want to make a modification to
  1465.   your Emacs.  Johan Vromans <jv@mh.nl> explains:
  1466.   
  1467.     There are a number of tricks that can be helpful. The most elegant
  1468.     solution, however, is to use the function "x-rebind-key". This function
  1469.     is commented out in the source for good reasons --- it's buggy.
  1470.   
  1471.     It is rather easy to replace this function with the function
  1472.     epoch:rebind-key from the Epoch distribution.
  1473.   
  1474.     After implementing this, all keyboard keys can be configured to send
  1475.     user definable sequences, e.g.
  1476.   
  1477.       (x-rebind-key "KP_F1" 0 "\033OP")
  1478.   
  1479.     This will have the keypad key PF1 send the sequence "ESC O P", just like
  1480.     an ordinary VT series terminal.                                          -
  1481.   
  1482.   This is what I do in my Emacs.  Note that you need to add an entry to
  1483.   syms_of_xfns at the bottom of src/x11fns.c.                                -
  1484.   
  1485. 54: How do I tell what characters my function keys emit?
  1486.   
  1487.   Use this function by Randal L. Schwartz <merlyn@iwarp.intel.com>:
  1488.   
  1489.     (defun see-chars ()
  1490.       "Displays characters typed, terminated by a 3-second timeout."
  1491.       (interactive)
  1492.       (let ((chars "")
  1493.         (inhibit-quit t))
  1494.     (message "Enter characters, terminated by 3-second timeout.")
  1495.     (while (not (sit-for 3))
  1496.       (setq chars (concat chars (list (read-char)))
  1497.         quit-flag nil))        ; quit-flag maybe set by C-g
  1498.     (message "Characters entered: %s" (key-description chars))))
  1499.   
  1500.   Alternatively, use the "C-h l" view-lossage command, which will display    +
  1501.   the last 100 characters Emacs has seen in its input stream.                +
  1502.   
  1503. 55: Why does Emacs spontaneously start displaying "I-search:" and beeping?
  1504.   
  1505.   Your terminal (or something between your terminal and the computer) is
  1506.   sending C-s and C-q for flow control, and Emacs is receiving these
  1507.   characters and interpreting them as commands.  (The C-s character normally
  1508.   invokes the isearch-forward command.)  The best solution is to disable the
  1509.   use of C-s and C-q for flow control.  If you can't do that, you can make
  1510.   Emacs treat C-s and C-q as flow control characters by evaluating this      !
  1511.   form:                                                                      !
  1512.   
  1513.     (set-input-mode nil t)
  1514.   
  1515.   If you are fixing this for yourself, simply put the form in your .emacs    +
  1516.   file.  If you are fixing this for your entire site, the best place to put  +
  1517.   it is unclear.  I don't know if this has any effect when used in           +
  1518.   lisp/site-init.el when building Emacs; I've never tried that.  {Can
  1519.   someone tell me whether it works?}  Putting things in users' .emacs files
  1520.   has a number of problems.  Putting this form in lisp/default.el has the
  1521.   problem that if the user's .emacs file has an error, this will prevent
  1522.   lisp/default.el from being loaded and Emacs may be unusable for the user,
  1523.   even for correcting their .emacs file (unless they're smart enough to move
  1524.   it to another name).
  1525.   
  1526.   If some of your users are connecting through XON/XOFF flow-controlled
  1527.   connections, but some are not, then here is a possible solution.  Disable
  1528.   C-s and C-q by setting keyboard-translate-table in lisp/site-init.el,
  1529.   either with swap-keys (see question 61) or with the following form:
  1530.   
  1531.     ;; by Roger Crew <crew@cs.stanford.edu>:
  1532.     (setq keyboard-translate-table
  1533.           "\C-@\C-a\C-b\C-c\C-d\C-e\C-f\C-g\C-h\C-i\C-j\C-k\C-l\C-m\C-n\C-o\C-p\C-^\C-r\C-\\\C-t\C-u\C-v\C-w\C-x\C-y\C-z\C-[\C-s\C-]\C-q\C-_")
  1534.   
  1535.   Then in lisp/default.el, if it is determined to be safe, they can be
  1536.   reenabled (being careful not to screw up any other key mappings users
  1537.   might have established using keyboard-translate-table, use swap-keys for
  1538.   this), or else set-input-mode can be called to further disable C-s and
  1539.   C-q.
  1540.   
  1541.   For further discussion of this issue, read the file PROBLEMS in the Emacs
  1542.   distribution.
  1543.   
  1544. 56: How do I disable the use of C-s and C-q for flow control?
  1545.   
  1546.   Your terminal may be using C-s and C-q for flow control.  On some
  1547.   terminals, it may be possible to turn this off from a setup menu.
  1548.   
  1549.   Some network box between the terminal and your computer may be using C-s
  1550.   and C-q for flow control.  You will probably have to ask your local
  1551.   network experts for help with this.
  1552.   
  1553. 57: What do I do if my terminal is sending C-s and C-q for flow control and
  1554.  I can't disable it?
  1555.   
  1556.   See question 55.
  1557.   
  1558. 58: How do I make Emacs honor C-s and C-q for flow control instead of for
  1559.  commands?
  1560.   
  1561.   See question 55.
  1562.   
  1563. 59: Why does Emacs never see C-s and C-q through my network connection?
  1564.   
  1565.   Eirik Fuller <eirik@theory.tn.cornell.edu> writes:
  1566.   
  1567.     Some versions of rlogin (and possibly telnet) do not pass flow control
  1568.     characters to the remote system to which they connect.  On such systems,
  1569.     Emacs on the remote system cannot disable flow control on the local
  1570.     system.  Sometimes "rlogin -8" will avoid this problem.
  1571.   
  1572.     One way to cure this is to disable flow control on the local host (the
  1573.     one running rlogin, not the one running rlogind) using the stty command,
  1574.     before starting the rlogin process.  On many systems, "stty start u stop
  1575.     u" will do this.
  1576.   
  1577.     Some versions of tcsh will prevent even this from working.  One way
  1578.     around this is to start another shell before starting rlogin, and issue
  1579.     the stty command to disable flow control from that shell.
  1580.   
  1581. 60: How do I use commands bound to C-s and C-q (or any key) if these keys
  1582.  are filtered out?
  1583.   
  1584.   I suggest swapping C-s with C-\ and C-q with C-^:
  1585.   
  1586.     (swap-keys ?\C-s ?\C-\\)
  1587.     (swap-keys ?\C-q ?\C-^)
  1588.   
  1589.   See question 61 for the implementation of swap-keys.
  1590.   
  1591. 61: How do I "swap" two keys?
  1592.   
  1593.   When Emacs receives a character, you can make Emacs behave as though it
  1594.   received another character by setting the value of
  1595.   keyboard-translate-table.  The following Emacs Lisp will do this for you,
  1596.   allowing you to "swap" keys.  After arranging for this Lisp to be
  1597.   evaluated by Emacs, you can evaluate `(swap-keys ?A ?B)' to swap A and B.
  1598.   
  1599.   WARNING: the value of C-g (7) is still hard coded in one place in the
  1600.   minibuffer code.  Thus, swapping C-g with another key may cause a minor
  1601.   problem.  (Fixed in Emacs 18.58.)                                          +
  1602.                                                                              +
  1603.     (defun swap-keys (key1 key2)                                             +
  1604.       "Swap keys KEY1 and KEY2 using map-key."
  1605.       (map-key key1 key2)
  1606.       (map-key key2 key1))
  1607.   
  1608.     (defun map-key (from to)
  1609.       "Make key FROM behave as though key TO was typed instead."
  1610.       (setq keyboard-translate-table
  1611.         (concat keyboard-translate-table
  1612.             (let* ((i (length keyboard-translate-table))
  1613.                (j from)
  1614.                (k i)
  1615.                (str (make-string (max 0 (- j (1- i))) ?X)))
  1616.               (while (<= k j)
  1617.             (aset str (- k i) k)
  1618.             (setq k (1+ k)))
  1619.               str)))
  1620.       (aset keyboard-translate-table from to)
  1621.       (let ((i (1- (length keyboard-translate-table))))
  1622.     (while (and (>= i 0) (eq (aref keyboard-translate-table i) i))
  1623.       (setq i (1- i)))
  1624.     (setq keyboard-translate-table
  1625.           (if (eq i -1)
  1626.           nil
  1627.         (substring keyboard-translate-table 0 (1+ i))))))
  1628.   
  1629.   NOTE: You must evaluate the definition of swap-keys before calling it!
  1630.   The easiest way is to list it first in the file (eg., your .emacs file).
  1631.   
  1632. 62: Why does the "Backspace" key invoke help?
  1633.   
  1634.   The Backspace key (on every keyboard I've used) sends ASCII code 8.  C-h
  1635.   sends the same code.  In Emacs by default C-h invokes `help-command'.
  1636.   This is intended to be easy to remember since the first letter of `help'
  1637.   is `h'.  The easiest solution to this problem is to use C-h (and
  1638.   Backspace) for help and DEL (the Delete key) for deleting the previous
  1639.   character.
  1640.   
  1641.   For many people this solution may be problematic:                          !
  1642.   
  1643.   1. They normally use Backspace outside of Emacs for deleting the previous
  1644.      character typed.  This can be solved by making DEL be the command for
  1645.      deleting the previous character outside of Emacs.  This command will do
  1646.      this on many Unix systems:
  1647.   
  1648.        stty erase '^?'
  1649.   
  1650.   2. The person may prefer using the Backspace key for deleting the previous
  1651.      character because it is more conveniently located on their keyboard or
  1652.      because they don't even have a separate Delete key.  In this case, the
  1653.      Backspace key should be made to behave like Delete.  One way is to swap
  1654.      the Backspace and Delete keys:
  1655.   
  1656.        (swap-keys ?\C-h ?\C-?)
  1657.   
  1658.      See question 61 for the implementation of swap-keys.                    +
  1659.   
  1660.      Another way is to switch keybindings to put help on "C-x h" instead:
  1661.   
  1662.        (global-set-key "\C-h" 'delete-backward-char)
  1663.        (global-set-key "\C-xh" 'help-command) ; override mark-whole-buffer
  1664.   
  1665.      WARNING: This method fails to switch the bindings of Backspace and      !
  1666.      Delete in the various major and minor modes that define their own       !
  1667.      backward-character-deletion or help commands, such as C mode and Lisp   !
  1668.      mode.  To actually do that for every mode is a lot of work.             !
  1669.   
  1670. 63: How do I type DEL on PC terminal emulators?
  1671.   
  1672.   Someone whose name I forgot wrote:
  1673.   
  1674.     Most PCs have deficient keyboards that don't have both Backspace and
  1675.     Delete keys.  Whether C-h (backspace) or DEL is generated by the
  1676.     "Backspace" key varies from one terminal emulator to another.  If you're
  1677.     lucky, you can reconfigure the keyboard so that it generates DEL.  If
  1678.     not, you will have to hunt to figure out what keystroke will do it ---
  1679.     possibilities include various shifted and controlled versions of
  1680.     "Backspace", the "Del" key on the numeric keypad (which might depend on
  1681.     "Shift" or "NumLock"), or perhaps C-? (Control-?).
  1682.   
  1683.   If this is too hard, you may want to swap the delete key with some other
  1684.   key.  See question 62.
  1685.   
  1686. 64: Can I make my "Compose" key behave like a "Meta" key?
  1687.   
  1688.   On a dumb terminal such as a VT220, no.  It is rumored that certain VT220
  1689.   clones could have their Compose key configured this way.  If you're on an
  1690.   X workstation, you might have luck using the "xmodmap" program.
  1691.   
  1692. 65: Why don't the arrow keys work?
  1693.   
  1694.   When Emacs starts up, it doesn't know anything about arrow keys at all
  1695.   (except when running under X, see question 53).  During the
  1696.   process of starting up, Emacs will load a terminal-specific initialization
  1697.   file for your terminal type (as determined by the environment variable
  1698.   TERM), if one exists.  This file has the responsibility for enabling the
  1699.   arrow keys.
  1700.   
  1701.   There are several things that can go wrong:
  1702.   
  1703.   1. There is no initialization file for your terminal.                      !
  1704.   
  1705.      You can determine this by looking in the lisp/term directory.  If your
  1706.      terminal type (as determined by the TERM environment variable) is       +
  1707.      xxx-yy-z, then the first of these files in the lisp/term directory will
  1708.      be loaded as the terminal-specific initialization file: xxx-yy-z.el,
  1709.      xxx-yy.el, or xxx.el.
  1710.   
  1711.      If there is none there, one can be made for your terminal, or you can
  1712.      just add code to your own .emacs to handle this problem for yourself.
  1713.      For example, if your terminal's arrow keys send these character
  1714.      sequences:
  1715.   
  1716.        Up:    ESC [ A
  1717.        Down:  ESC [ B
  1718.        Right: ESC [ C
  1719.        Left:  ESC [ D
  1720.   
  1721.      then you can bind these keys to the appropriate commands with code in
  1722.      your .emacs like this:
  1723.   
  1724.        (setq term-setup-hook
  1725.          (function
  1726.           (lambda ()
  1727.         (cond ((string-match "\\`xyzzy" (or (getenv "TERM") ""))
  1728.                        ;; First, must unmap the binding for M-[              +
  1729.                        (or (keymapp (lookup-key global-map "\e["))           +
  1730.                            (define-key global-map "\e[" nil))                +
  1731.                        ;; Enable terminal type xyzzy's arrow keys:           +
  1732.                (define-key global-map "\e[A" 'previous-line)
  1733.                (define-key global-map "\e[B" 'next-line)
  1734.                (define-key global-map "\e[C" 'forward-char)
  1735.                (define-key global-map "\e[D" 'backward-char))
  1736.                       ((string-match "\\`abcde" (or (getenv "TERM") ""))     +
  1737.                        ;; Do something different for terminal type abcde     +
  1738.                        ;; .....                                              +
  1739.                        ))))))                                                +
  1740.   
  1741.      This technique allows you to easily add more `cond' cases for different
  1742.      terminal types.  NOTE: You will have to restart Emacs to get this
  1743.      change to take effect when using this technique.
  1744.   
  1745.   The next two cases are problems even if there is a initialization file for
  1746.   your terminal type.
  1747.   
  1748.   2. Your terminal's arrow keys send individual control characters.          !
  1749.   
  1750.      There is not much Emacs can do in this situation, since all the control
  1751.      characters except for C-^ and C-\ are already used as Emacs commands.
  1752.      You have to make the hard choices of how to rebind keys to commands to
  1753.      make things work the way you want.
  1754.   
  1755.   3. Your terminal's arrow keys send sequences beginning with "ESC [".       !
  1756.   
  1757.      Due to an extremely poor design decision (ie., these sequences are ANSI !
  1758.      standard), none of the the terminal-specific initialization files that
  1759.      are distributed with Emacs will bind these character sequences to the   !
  1760.      appropriate commands by default.  (This also applies to any other       +
  1761.      function keys which generate character sequences starting with "ESC     +
  1762.      [".)  This is because it was deemed far more important to preserve the
  1763.      binding of M-[ to the backward-paragraph command.  It appears that this !
  1764.      will change in Emacs 19.                                                !
  1765.                                                                              !
  1766.      Some of the terminal-specific initialization files that come with Emacs !
  1767.      provide a command `enable-arrow-keys' that will fix this problem.  To   !
  1768.      get this automatically invoked, put this in your .emacs:
  1769.   
  1770.        (setq term-setup-hook
  1771.          (function
  1772.           (lambda ()
  1773.         (if (fboundp 'enable-arrow-keys) (enable-arrow-keys)))))
  1774.   
  1775.      We put this in our lisp/default.el file, so users don't have to worry
  1776.      about it:
  1777.   
  1778.        ;; don't override a user's term-setup-hook
  1779.        (or term-setup-hook
  1780.        (setq term-setup-hook
  1781.          (function
  1782.           (lambda ()
  1783.             (and (fboundp 'enable-arrow-keys)
  1784.              ;; don't override a user key mapping
  1785.              (eq 'backward-paragraph (lookup-key esc-map "["))
  1786.              (enable-arrow-keys))))))
  1787.   
  1788.      If your terminal type is `sun', you should put this in your .emacs      +
  1789.      instead (or in addition to the above):                                  +
  1790.                                                                              +
  1791.        (setq sun-esc-bracket t)                                              +
  1792.                                                                              +
  1793.      If your terminal type is `xterm', you will have to bind the arrow keys  +
  1794.      as in part 1 above, since the xterm.el file doesn't do anything useful. +
  1795.                                                                              +
  1796.      It is possible that the terminal-specific initialization file for your  +
  1797.      terminal type was written locally and does not follow the rule          +
  1798.      mentioned above.  In this case you may need to inspect it to find out   +
  1799.      how to enable the arrow keys.  (Actually, if it was written locally, it +
  1800.      probably enables the arrow keys by default.)                            +
  1801.   
  1802. 66: How do I bind a combination of modifier key and function key?
  1803.   
  1804.   Unless you're using Emacs under emacstool (or xvetool?) or you have a
  1805.   working version of x-rebind-key (see question 53), you can't do this
  1806.   with Emacs alone.  When using emacstool, Emacs sees different character
  1807.   sequences for the combination of a modifier and a function key from what
  1808.   it sees for the function key alone.  See etc/emacstool.1 for more
  1809.   information.  Since Emacs sees different character sequences, you can bind
  1810.   these different sequences to different commands.
  1811.   
  1812.   If you are running Emacs inside a terminal emulator window like xterm, you
  1813.   can modify its translation tables to make it generate different character
  1814.   sequences for the combination of a modifier and a function key.  For
  1815.   example, this X resource setting:
  1816.   
  1817.     XTerm.VT100.Translations: #override \
  1818.       Shift<KeyPress>F1: string(0x1b) string("[xyzzy")
  1819.   
  1820.   makes Shift-F1 generate the character sequence "ESC [ xyzzy".  You can
  1821.   bind these character sequences in Emacs as normal.
  1822.   
  1823. 67: Why doesn't my Meta key work in an xterm window?
  1824.   
  1825.   Try all of these methods before asking for further help:                   !
  1826.   
  1827.   * For X11R4: Make sure it really is a Meta key.  Use "xev" to find out
  1828.     what keysym your Meta key generates.  It should be either Meta_L or
  1829.     Meta_R.  If it isn't, use xmodmap to fix the situation.
  1830.   
  1831.   * Make sure the pty the xterm is using is passing 8 bit characters.
  1832.     "stty -a" (or "stty everything") should show "cs8" somewhere.  If it
  1833.     shows "cs7" instead, use "stty cs8 -istrip" (or "stty pass8") to fix
  1834.     it.
  1835.   
  1836.   * If there is an rlogin connection between the xterm and the Emacs, the
  1837.     "-8" argument may need to be given to rlogin to make it pass all 8
  1838.     bits of every character.
  1839.   
  1840.   * If the Emacs is running under Ultrix, it may help to evaluate
  1841.     (set-input-mode t nil).
  1842.   
  1843.   * If all else fails, you can make xterm generate "ESC W" when you type
  1844.     M-W, which is the same conversion Emacs would make if it got the M-W
  1845.     anyway.  In X11R4, the following resource specification will do this:
  1846.   
  1847.       XTerm.VT100.EightBitInput: false
  1848.   
  1849.     (This changes the behavior of the insert-eight-bit action.)
  1850.   
  1851.     With older xterms, you can specify this behavior with a translation:
  1852.   
  1853.       XTerm.VT100.Translations: #override \
  1854.         Meta<KeyPress>: string(0x1b) insert()
  1855.   
  1856.     You might have to replace "Meta" with "Alt".
  1857.   
  1858. 68: Why doesn't my ExtendChar key work as a Meta key under HP-UX 8.0?
  1859.   
  1860.   This is a result of an internationalization extension in X11R4 and the
  1861.   fact that HP is now using this extension.  Emacs assumes that
  1862.   XLookupString returns the same result regardless of the Meta key state
  1863.   which is no longer necessarily true.  Until Emacs is fixed, the temporary
  1864.   kludge is to run this command after each time the X server is started but
  1865.   preferably before any xterm clients are:
  1866.   
  1867.     xmodmap -e 'remove mod1 = Mode_switch'
  1868.   
  1869.   NOTE:  This will disable the use of the extra keysyms systemwide, which
  1870.   may be undesirable if you actually intend to use them.                     -
  1871.   
  1872. 69: Where can I get key bindings to make Emacs emulate WordStar?
  1873.   
  1874.   Look for the package `wordstar' in the Emacs Lisp Archive (see question
  1875.   18).
  1876.  
  1877.  
  1878. ---Continued---
  1879.  
  1880.  
  1881. Building/Installing/Porting Emacs and Machine/OS-Specific Bugs:
  1882.  
  1883. 70: Why does Emacs crash with "Fatal error (6).Abort" under SunOS 4.1?
  1884.   
  1885.   I had hoped this question would go away after Emacs 18.57 was released,
  1886.   but people continue to compile 18.55.
  1887.   
  1888.   There is a bug in the "localtime" routine supplied with SunOS 4.1.  A
  1889.   private function called by tzsetwall zeroes the byte just past an eight
  1890.   byte region it mallocs.  This corrupts GNU malloc's memory pool.  When GNU
  1891.   malloc detects this it aborts.
  1892.   
  1893.   In the 18.57 release "#define SYSTEM_MALLOC" has been added to the
  1894.   configuration file for SunOS 4.1, which allows Emacs to work.
  1895.   
  1896.   In SunOS 4.1.1, it appears that Sun has still not fixed their bug, since
  1897.   the localtime.o file did not change.  They must be aware of it since they
  1898.   suggest using "#define SYSTEM_MALLOC" to compile Emacs in their
  1899.   documentation.  It is reported that this same bug causes mysterious
  1900.   behavior in Sun's /usr/etc/rpc.mountd.
  1901.   
  1902.   For people who want to fix this problem for real, there is a fixed version
  1903.   of the localtime.o file available via anonymous FTP (titan.rice.edu:
  1904.   incoming/localtime.tar.Z).  {Someone has reported that this file is now    +
  1905.   missing.}  The new localtime.o file should be installed in the             +
  1906.   /usr/lib/libc{.a,.so.*} files.  Read the `ar' man page and the README file
  1907.   in /usr/lib/shlib.etc for instructions.
  1908.   
  1909.   I also have a patch by Eirik Fuller <eirik@theory.tn.cornell.edu> which
  1910.   makes GNU malloc allocate 16 bytes when it is asked for 8, thus working
  1911.   around Sun's bug.
  1912.   
  1913.   Now stop asking this question!  :-)  :-)
  1914.   
  1915. 71: Why do I get an "f68881_used undefined" error, when I build Emacs on my
  1916.  Sun 3?
  1917.   
  1918.   Barry A. Warsaw <warsaw@cme.nist.gov> writes:
  1919.   
  1920.     Some of the code that is being linked on the "ld" line of emacs' build
  1921.     command has been compiled with the -f68881 option.  Most common reason
  1922.     is that you're linking with X libraries which were built with -f68881
  1923.     option set.  You need to either remove all dependencies to the 68881
  1924.     (may mean a recompile of the X libraries with -fswitch or -fsoft
  1925.     option), or you need to link emacs with the 68881 startup file
  1926.     /usr/lib/Mcrt1.o.  Make this change to src/ymakefile:
  1927.   
  1928.       change: #define START_FILES crt0.o
  1929.       to:     #define START_FILES crt0.o /usr/lib/Mcrt1.o
  1930.   
  1931.     The order of these start files is critical.
  1932.   
  1933. 72: Why does Emacs ignore my X resources (my .Xdefaults file)?
  1934.   
  1935.   * Try compiling Emacs with the XBACKWARDS macro defined.  There is a bug   +
  1936.     in some implementations of XGetDefault, which do not correspond to the
  1937.     documentation or the header files.
  1938.   
  1939.   * Make sure you are either using the class name of `Emacs' or the correct  +
  1940.     instance name.  The instance name is normally the same as the name of    +
  1941.     the file Emacs is in (ie., the last part of argv[0]), but this can be    +
  1942.     overridden by -rn command line option or the WM_RES_NAME environment     +
  1943.     variable.                                                                +
  1944.                                                                              +
  1945.     WARNING: The advice the man page gives to use `emacs' is often wrong.    +
  1946.                                                                              +
  1947.     WARNING: Older versions of Emacs got the class name wrong.               +
  1948.                                                                              +
  1949.   * Emacs currently ignores the -xrm command lline argument.                 +
  1950.                                                                              +
  1951.   * Emacs does not yet handle X11R5 screen-specific resources.               +
  1952.                                                                              +
  1953.   * Emacs has a bug where it ignores color specifications if running on a    +
  1954.     1-bit display (ie. a non-color display).                                 +
  1955.   
  1956. 73: How do I get Emacs to compile with all features under OpenWindows?
  1957.   
  1958.   The reference to include file <X11/X10.h> can simply be deleted.  It
  1959.   appears that you can link with the OpenWindows libraries instead of MIT's
  1960.   libX11.a.  To get the Xmenu stuff to work, you need to find a copy of
  1961.   MIT's liboldX.a.
  1962.   
  1963.   Questions for the net {please send me answers!}:                           !
  1964.                                                                              !
  1965.   * Are compiled versions of liboldX.A for Sun 4s running SunOS 4.*          !
  1966.     available for FTP anywhere?                                              !
  1967.   * What is the solution to the "not a sun window" problem with xvetool?
  1968.   * What is the deal with missing non-shared libraries?  (My SunOS 4.1.1
  1969.     machine has the non-shared libX11.a under /usr/openwin/lib.)
  1970.   
  1971. 74: How do I build Emacs under HP-UX 8.0?
  1972.   
  1973.   Simon Leinen <simon@liasun2.epfl.ch> has organized a set of patches which  !
  1974.   "circumvent dynamic linking and missing include files" so that Emacs 18.57 !
  1975.   will work under HP-UX 8.0 on HP 9000 machines, including 700 and 800       !
  1976.   series.  The patches are available via anonymous FTP (liasun3.epfl.ch:     !
  1977.   pub/gnu/emcs1857HPUX8p).  Both Simon and Darryl Okahata                    !
  1978.   <darrylo@sr.hp.com> offer to e-mail this patch if you can't FTP.  This set +
  1979.   of patches was last changed on January 1, 1992; the date in the file is    +
  1980.   wrong.                                                                     +
  1981.   
  1982.   There is an "unofficial HP GNU Emacs" that contains a number of added
  1983.   features, but it still requires a set of patches to work with HP-UX 8.0,
  1984.   apparently only available via e-mail from Darryl Okahata
  1985.   <darrylo@sr.hp.com>.
  1986.   
  1987. 75: What should I do if I have trouble building Emacs?
  1988.   
  1989.   First look in the file etc/PROBLEMS to see if there is already a solution  !
  1990.   for your problem.  Next check the FAQ (you're reading it).  If you don't   !
  1991.   find a solution, then report your problem via e-mail to                    !
  1992.   bug-gnu-emacs@prep.ai.mit.edu.  Please do not post it to gnu.emacs.help or !
  1993.   e-mail it to help-gnu-emacs@prep.ai.mit.edu.                               !
  1994.   
  1995.  
  1996.  
  1997. Weird/Confusing Problems:
  1998.  
  1999. 76: Does Emacs have problems with files larger than 8 megabytes?
  2000.   
  2001.   Most installed versions of GNU Emacs will use 24 bit signed integers
  2002.   (and 24 bit pointers!) internally.  This limits the file size that Emacs
  2003.   can handle to 8388608 bytes.
  2004.   
  2005.   Leonard N. Zubkoff <lnz@lucid.com> writes:
  2006.   
  2007.     Putting the following two lines in src/config.h before compiling Emacs
  2008.     allows for 26 bit integers and pointers:
  2009.   
  2010.       #define VALBITS 26
  2011.       #define GCTYPEBITS 5                                                   -
  2012.   
  2013.   David Gillespie <daveg@csvax.cs.caltech.edu> gives an explanation of why   !
  2014.   Emacs uses 24 bit integers and pointers:                                   !
  2015.   
  2016.     Emacs is largely written in a dialect of Lisp; Lisp is a freely-typed
  2017.     language in the sense that you can put any value of any type into any
  2018.     variable, or return it from a function, and so on.  So each value must
  2019.     carry a "tag" along with it identifying what kind of thing it is, e.g.,
  2020.     integer, pointer to a list, pointer to an editing buffer, and so on.
  2021.     Emacs uses standard 32-bit integers for data objects, taking the top 8
  2022.     bits for the tag and the bottom 24 bits for the value.  So integers (and
  2023.     pointers) are somewhat restricted compared to true C integers and
  2024.     pointers.
  2025.   
  2026.     Emacs uses 8-bit tags because that's a little faster on byte-oriented
  2027.     machines, but there are only really enough tags to require 6 bits.  See
  2028.     question 76 to find how to recompile Emacs with 6-bit tags and
  2029.     26-bit integers and pointers if space is at a premium for you.
  2030.   
  2031. 77: Why does Emacs start up using the wrong directory?
  2032.   
  2033.   Most likely, you have an environment variable named PWD that is set to a
  2034.   value other than the name of your current directory.  This is most
  2035.   likely caused by using two different shell programs.  "ksh" and (some
  2036.   versions of) "csh" set and maintain the value of the PWD environment
  2037.   variable, but "sh" doesn't.  If you start sh from ksh, change your
  2038.   current directory inside sh, and then start Emacs from inside sh, PWD
  2039.   will have the wrong value but Emacs will use this value.  See the
  2040.   etc/OPTIONS file for more details.
  2041.   
  2042.   Perhaps an easier solution is not to use two shells.  The "chsh" program
  2043.   can often be used to change one's default login shell.
  2044.   
  2045. 78: How do I edit a file with a "$" in its name?
  2046.   
  2047.   When entering a filename in the minibuffer, Emacs will attempt to expand
  2048.   a "$" followed by a word as an environment variable.  To suppress this
  2049.   behavior, type "$$" instead.
  2050.   
  2051. 79: Why does Shell mode lose track of the shell's current directory?
  2052.   
  2053.   Emacs has no way of knowing when the shell actually changes its directory.
  2054.   This is an intrinsic limitation of Unix.  So it tries to guess by
  2055.   recognizing "cd" commands.  If you type "cd" followed by a directory name
  2056.   with a variable reference ("cd $HOME/bin") or with a shell metacharacter
  2057.   ("cd ../lib*"), Emacs will fail to correctly guess the shell's new current
  2058.   directory.  A huge number of fixes and enhancements to Shell mode for this
  2059.   problem have been written to handle this problem.  Check the Lisp Code
  2060.   Directory (see question 17).
  2061.   
  2062. 80: Why doesn't Emacs expand my aliases when sending mail?
  2063.   
  2064.   * You must separate multiple addresses with commas.  This is because Emacs !
  2065.     supports RFC822 standard addresses like this one:                        !
  2066.   
  2067.       Willy Smith <wks@xpnsv.lwyrs.com>
  2068.   
  2069.   * Emacs normally only reads the ".mailrc" file once per session, when you  !
  2070.     start to compose your first mail message.  If you edit .mailrc, you can
  2071.     type "M-ESC (build-mail-aliases) RET" to make Emacs reread .mailrc.
  2072.     (You have to include the parentheses where they are shown!)
  2073.   
  2074.   * Emacs does not interpret vendor-specific additions to the format of the  +
  2075.     .mailrc file such as the `source' command.                               +
  2076.   
  2077. 81: Why doesn't my change to load-path work?
  2078.   
  2079.   If you added a directory name containing a tilde (~) to your load-path,
  2080.   expecting the tilde to be interpreted as your home directory, then you
  2081.   need to do something like this:
  2082.   
  2083.     (setq load-path (mapcar 'expand-file-name load-path))
  2084.   
  2085. 82: Why does the cursor always go to the wrong column when I move up or
  2086.  down one line?
  2087.   
  2088.   You have inadvertently typed "C-x C-n" (set-goal-column) which sets the
  2089.   "goal-column" to the column where the cursor was.  To undo this type
  2090.   "C-u C-x C-n".
  2091.   
  2092.   If you make this mistake frequently, you might want to unbind or disable
  2093.   this command by doing one of these two:
  2094.   
  2095.     (define-key ctl-x-map "\C-n" nil)
  2096.     (put 'set-goal-column 'disabled t)
  2097.   
  2098. 83: Why does Emacs hang with message "Unknown XMenu" with X11R4?
  2099.   
  2100.   Many different X errors can produce this message.  Here is the solution
  2101.   to one problem:
  2102.   
  2103.   X11 Release 4 now enforces some conditions in the X protocol that were
  2104.   previously allowed to pass unnoticed.  You need to put the X11R4 server
  2105.   into X11R3 bug compatibility mode for Emacs's Xmenu code to work.  You
  2106.   can do this with the command "xset bc".
  2107.   
  2108. 84: Why doesn't display-time show the load average in the mode line
  2109.  anymore?
  2110.   
  2111.   In GNU Emacs 18.56, a change was made in the display-time code.
  2112.   Formerly, in version 18.55, Emacs used a program named "loadst" to
  2113.   notify Emacs of the change in time every minute.  loadst also sent Emacs
  2114.   the system load average if it was installed with sufficient privilege to
  2115.   get that information (or was on a system where no such privilege was
  2116.   needed).  Emacs then displayed this information in the mode line.
  2117.   
  2118.   In version 18.56, this code was changed to use a program named "wakeup".
  2119.   wakeup doesn't send Emacs any information, it's only purpose is to send
  2120.   Emacs *something* every minute, thus invoking the filter function in
  2121.   Emacs once a minute.  The filter function in Emacs does all the work of
  2122.   finding the time, date, and load average.  However, getting the load
  2123.   average requires the privilege to read kernel memory on most systems.
  2124.   Since giving Emacs this privilege would destroy any security a system
  2125.   might have, for almost everyone this is not an option.  In addition,
  2126.   Emacs does not have the code built into it to get this information on
  2127.   the systems which have special system calls for this purpose, even
  2128.   though loadst had code for this.
  2129.   
  2130.   The solution I use is to get the files lisp/display-time.el and
  2131.   etc/loadst.c from version 18.55 and use those with 18.57.  (I have heard
  2132.   a rumor that loadst disappeared because of the legal action Unipress
  2133.   threatened against IBM.)
  2134.   
  2135.   WARNING:  Do not install Emacs setgid kmem unless you wish to destroy
  2136.   any security your system might have!!!!!!!!!!
  2137.   
  2138.   If you are using Emacs 18.55 or earlier, or already using the solution I
  2139.   describe above, read further:
  2140.   
  2141.   The most likely cause of the problem is that "loadst" can't read the
  2142.   special file /dev/kmem.  To properly install loadst, it should be either
  2143.   setuid to the owner of /dev/kmem, or is should be setgid to the group to
  2144.   which /dev/kmem belongs.  In either case, /dev/kmem should be readable by
  2145.   its owner or its group, respectively.
  2146.   
  2147.   Another possibility is that your version of Unix doesn't have the load
  2148.   average data available in /dev/kmem.  Your version of Unix might have a
  2149.   special system call to retrieve this information (eg., inq_stats under
  2150.   UMAX), and loadst might not have been enhanced to cope with this.
  2151.   
  2152. 85: Why doesn't GNUS work anymore via NNTP?
  2153.   
  2154.   There is a bug in NNTP version 1.5.10, such that when multiple requests
  2155.   are sent to the NNTP server, the server only handles the first one before
  2156.   blocking waiting for more input which never comes.  NNTP version 1.5.11
  2157.   claims to fix this.
  2158.   
  2159.   You can work around the bug inside Emacs like this:
  2160.   
  2161.     (setq nntp-maximum-request 1)
  2162.   
  2163.   I also have a patch for NNTP 1.5.10 by Mike Pelletier
  2164.   <stealth@engin.umich.edu> that is based on the timeout code that was in
  2165.   1.5.9.  However, please try to upgrade to 1.5.11 first.
  2166.   
  2167.   You can find out what version of NNTP your news server is running by       +
  2168.   telnetting to the NNTP port (usually 119) on the news server machine (ie., +
  2169.   `telnet server-machine 119').  The server should give its version number   +
  2170.   in the welcome message.  Type `quit' to get out.                           +
  2171.   
  2172. 86: Why does ispell sometimes ignore the local dictionary?
  2173.   
  2174.   You need to update the version of ispell to 2.0.02.  (Or you can switch to
  2175.   version 3.0 which is still in beta-testing.)  A patch is available via
  2176.   anonymous FTP (archive.cis.ohio-state.edu: /pub/gnu/ispell/patch2.Z).
  2177.   
  2178.   You also need to change a line in ispell.el from:
  2179.   
  2180.     (defconst ispell-version "2.0.01") ; Check against output of "ispell -v".
  2181.   
  2182.   to:
  2183.   
  2184.     (defconst ispell-version "2.0.02") ; Check against output of "ispell -v".
  2185.   
  2186. 87: How do I get rid of the ^M junk in my Shell buffer?
  2187.   
  2188.   For tcsh, put this in your ".cshrc" (or ".tcshrc") file:
  2189.   
  2190.     if ($?EMACS) then
  2191.         if ("$EMACS" == t) then
  2192.         if ($?tcsh) unset edit
  2193.         stty nl
  2194.     endif
  2195.     endif
  2196.   
  2197.   Or put this in your .emacs_tcsh file:
  2198.   
  2199.     unset edit
  2200.     stty nl
  2201.   
  2202.   Alternatively, use csh in your Shell buffers instead of tcsh.  One way
  2203.   is:
  2204.   
  2205.     (setq explicit-shell-file-name "/bin/csh") 
  2206.   
  2207.   and another is to do this in your .cshrc (or .tcshrc) file:
  2208.   
  2209.     setenv ESHELL /bin/csh
  2210.   
  2211.   (You must start Emacs over again with the environment variable properly
  2212.   set for this to take effect.)
  2213.   
  2214. 88: Are there any security risks in GNU Emacs?                               !
  2215.                                                                              !
  2216.   1. the `movemail' incident (No, this is not a risk.)                       !
  2217.                                                                              !
  2218.      Cliff Stoll in his book "The Cuckoo's Egg" describes this in chapter 4. !
  2219.      The site at LBL had installed the `etc/movemail' program setuid root.   !
  2220.      Since `movemail' had not been designed for this situation, a security   !
  2221.      hole was created and users could get root priveleges.                   !
  2222.                                                                              !
  2223.      `movemail' has since been changed so that even if it is installed       !
  2224.      setuid root this security hole will not be a result.                    !
  2225.                                                                              !
  2226.      I have heard reports that the Internet worm took advantage of this      !
  2227.      configuration problem.                                                  !
  2228.                                                                              !
  2229.   2. the file-local-variable feature (Yes, a risk, but easy to change.)      !
  2230.                                                                              !
  2231.      There is an Emacs feature that allows the setting of local values for   !
  2232.      variables when editing a file by including specially formatted text     !
  2233.      near the end of the file.  This feature also includes the ability to    !
  2234.      have arbitrary Emacs Lisp code evaluated when the file is visited.      !
  2235.      Obviously, there is a potential for Trojan horses to exploit this       !
  2236.      feature.                                                                !
  2237.                                                                              !
  2238.      However, if you set the variable inhibit-local-variables to a non-nil   !
  2239.      value, Emacs will display the special local variable settings of a file !
  2240.      that you visit and ask you if you really want them.  It is reasonable   !
  2241.      to do this in lisp/site-init.el before building Emacs:                  !
  2242.   
  2243.        (setq inhibit-local-variables t)
  2244.   
  2245.      If Emacs has already been built, the expression can be put in           !
  2246.      lisp/default.el instead, or an individual can put it in their own       !
  2247.      .emacs file.                                                            !
  2248.                                                                              !
  2249.      The ability to exploit this feature by sending e-mail to an RMAIL user  !
  2250.      was fixed sometime after Emacs 18.52.  However, any new package that    !
  2251.      uses find-file or find-file-noselect has to be careful about this.      !
  2252.   
  2253. 89: How do I recover my mail files after RMAIL munges their format?
  2254.   
  2255.   Users who just want to try RMAIL out to see how it works end up trapped    !
  2256.   using it because saved mail in their mbox file has been converted into an  !
  2257.   incompatible format (BABYL) that only RMAIL understands.  RMAIL provides   !
  2258.   no obvious way to reverse this transformation.  To convert a mail file     !
  2259.   back to standard Unix format, there are several methods:                   !
  2260.                                                                              !
  2261.   * Use the rmail-output ("C-o") command within RMAIL on each message in the !
  2262.     file.  First use M-x rmail or M-x rmail-input to visit the RMAIL file in !
  2263.     Rmail mode.  Type "1 j" to go to the first message.  Use the C-o command !
  2264.     to output the message to a Unix format file.  Type "n" to go to the next !
  2265.     message.  Repeat.                                                        !
  2266.                                                                              !
  2267.   * If the file contains hundreds of messages, you may not want to repeat    !
  2268.     this for all of them.  Instead of the above, after getting to the first  !
  2269.     message type this (where "mbox" is the file you want to put the messages !
  2270.     in):                                                                     !
  2271.                                                                              !
  2272.       C-x ( C-o mbox RET M-s ^From: RET M-0 C-x )                            !
  2273.                                                                              !
  2274.     (The rmail-search command ("M-s") is used instead of just "n" because it !
  2275.     is the only command which will cause an error when it reaches the last   !
  2276.     message in the file, which is necessary to terminate the keyboard macro. !
  2277.     This will fail if there are messages in the file that don't have a       !
  2278.     `From:' header.  This assumes rmail-delete-after-output is nil.)         !
  2279.                                                                              !
  2280.     It is wise to save a copy of the RMAIL file first, in case you make a    !
  2281.     mistake.                                                                 !
  2282.                                                                              !
  2283.   * There are software packages available for converting files or even       !
  2284.     entire directories of BABYL files to standard Unix format.  These are    !
  2285.     helpful in this situation, but are intended mainly for people who have   !
  2286.     used RMAIL for a long time and are converting to some other mail reader. !
  2287.     Lookup `rmail', `vm', and `babyl' in the Emacs Lisp Archive (see         !
  2288.     question 18).
  2289.   
  2290.   You may wish to disable RMAIL to avoid accidentally destroying your mbox   !
  2291.   file (I have this in my .emacs):                                           !
  2292.                                                                              !
  2293.     (put 'rmail 'disabled t)            ; avoid mbox destruction             !
  2294.   
  2295. 90: Why do I get "Process shell exited abnormally with code 1"?
  2296.   
  2297.   The most likely reason for this message is that the "env" program is not
  2298.   properly installed.  This program should be compiled and installed with
  2299.   execute permission for everyone in Emacs's program directory, which is
  2300.   normally /usr/local/emacs/etc.  You can find what this directory is at
  2301.   your site by inspecting the value of the variable exec-directory by typing
  2302.   "C-h v exec-directory RET".
  2303.   
  2304.  
  2305.  
  2306. Configuring Emacs for yourself:
  2307.  
  2308. 91: How do I set up a .emacs file properly?
  2309.   
  2310.   See the section of the manual on the .emacs file, inside the section on
  2311.   customization.  To reach this section of the online Info manual, type
  2312.   this:
  2313.   
  2314.     C-h i m emacs RET g init SPC file RET
  2315.   
  2316.   WARNING:  In general, new Emacs users should not have .emacs files,
  2317.   because it causes confusing non-standard behavior.  Then they send
  2318.   questions to help-gnu-emacs asking why Emacs isn't behaving as
  2319.   documented.  :-)
  2320.   
  2321. 92: How do you debug a .emacs file?
  2322.   
  2323.   First start Emacs with the "-q" command line option.  Then, in the
  2324.   *scratch* buffer, type the following:
  2325.   
  2326.     (setq debug-on-error t) LFD
  2327.     (load-file "~/.emacs") LFD
  2328.   
  2329.   (Type LFD by pressing C-j.)
  2330.   
  2331.   If you have an error in your .emacs file, this will invoke the debugger
  2332.   when the error occurs.  If you don't know how to use the debugger do
  2333.   (setq stack-trace-on-error t) instead.
  2334.   
  2335.   WARNING: this will not discover errors caused by trying to do something
  2336.   that requires the terminal/window-system initialization code to have
  2337.   been loaded.  See question 51.
  2338.   
  2339. 93: How do I turn on abbrevs by default just in mode XXX?
  2340.   
  2341.   Put this in your .emacs file:
  2342.   
  2343.     (condition-case ()
  2344.     (read-abbrev-file nil t)
  2345.       (file-error nil))
  2346.   
  2347.     (setq XXX-mode-hook
  2348.       (function
  2349.        (lambda ()
  2350.          (setq abbrev-mode t))))
  2351.   
  2352. 94: How do I turn on Auto-Fill mode by default?
  2353.   
  2354.   To turn on Auto-Fill mode just once for one buffer, you type "M-x
  2355.   auto-fill-mode".  To turn it on for every buffer in, for example, Text
  2356.   mode, do this:
  2357.   
  2358.     (setq text-mode-hook 'turn-on-auto-fill)
  2359.   
  2360.   If you want Auto-Fill mode on in all major modes, do this:
  2361.   
  2362.     (setq-default auto-fill-hook 'do-auto-fill)
  2363.   
  2364. 95: How do I make Emacs use a certain major mode for certain files?
  2365.   
  2366.   If you want to use XXX mode for all files which end with the extension
  2367.   ".YYY", this will do it for you:
  2368.   
  2369.     (setq auto-mode-alist (cons '("\\.YYY\\'" . XXX-mode) auto-mode-alist))
  2370.   
  2371.   Otherwise put this somewhere in the first line of any file you want to
  2372.   edit in XXX mode:
  2373.   
  2374.     -*-XXX-*-
  2375.   
  2376. 96: What are the valid X resource settings (ie., stuff in .Xdefaults file)?
  2377.   
  2378.   See the Emacs man page, or the etc/OPTIONS file.  Ignore the information   +
  2379.   in etc/XDOC which is way out of date.                                      +
  2380.   
  2381. 97: How do I stop Emacs from beeping on a terminal?
  2382.   
  2383.   Martin R. Frank <martin@cc.gatech.edu> writes:
  2384.   
  2385.     Tell Emacs to use the 'visible bell' instead of the audible bell, and
  2386.     set the visible bell to nothing.
  2387.   
  2388.     Put this in your TERMCAP environment variable:
  2389.   
  2390.       ... :vb=: ...                       
  2391.   
  2392.     And evaluate this:
  2393.   
  2394.       (setq visible-bell t)
  2395.   
  2396. 98: How do I turn down the bell volume in Emacs running under X Windows?
  2397.   
  2398.   Under Epoch you can do:
  2399.   
  2400.     (setq epoch::bell-volume 20)
  2401.   
  2402.   Under normal GNU Emacs you must modify the XTfeep function in
  2403.   src/x11term.c, and change the number 50 to -50:
  2404.   
  2405.     XTfeep ()
  2406.     {
  2407.         BLOCK_INPUT_DECLARE ();
  2408.     #ifdef XDEBUG
  2409.         fprintf (stderr, "XTfeep\n");
  2410.     #endif
  2411.         BLOCK_INPUT ();
  2412.         XBell (XXdisplay,50);    /* change this 50 to -50 */
  2413.         UNBLOCK_INPUT ();
  2414.     }
  2415.   
  2416.   Then "xset b 0" will turn off Emacs's beeping.
  2417.   
  2418.   After "xset b BASE":
  2419.   
  2420.     XBell (disp,  VAL) beeps with volume BASE - (BASE*VAL)/100 + VAL,
  2421.     XBell (disp, -VAL) beeps with volume BASE - (BASE*VAL)/100.
  2422.   
  2423. 99: How do I change load-path?
  2424.   
  2425.   In general, you should only *add* to the load-path.  You can add
  2426.   directory /XXX/YYY to the load path like this:
  2427.   
  2428.     (setq load-path (append load-path '("/XXX/YYY/")))
  2429.   
  2430.   To do this relative to your home directory:
  2431.   
  2432.     (setq load-path (append load-path (list (expand-file-name "~/YYY/"))))
  2433.   
  2434. 100: How do I change the included text prefix in mail/news followups?        !
  2435.   
  2436.   You can find the code that prefixes with spaces and change it.  You can
  2437.   also use SuperCite, which provides wide configurability in how you format
  2438.   included text in replies.  See question 21.
  2439.   
  2440.  
  2441.  
  2442. Emacs Lisp programming:
  2443.  
  2444. 101: What dialect of Lisp is Emacs Lisp?
  2445.   
  2446.   It's the dialect of Lisp called Emacs Lisp.  (No joke!)  People also
  2447.   call it elisp or e-lisp.  (NOTE: The term "Elisp" is trademarked by
  2448.   someone else.  {Unipress?  Uniworks?  Can someone tell me?})               +
  2449.   
  2450. 102: How close is Emacs Lisp to Common Lisp?
  2451.   
  2452.   They are not close.  GNU Emacs Lisp is case-sensitive, uses dynamic
  2453.   scoping, doesn't have packages, doesn't have multiple return values,
  2454.   doesn't have reader macros, doesn't have rational, floating point, or
  2455.   arbitrary size numbers, etc.  For people used to Common Lisp, some of the
  2456.   functions in Common Lisp that are not in Emacs Lisp by default are
  2457.   provided in the file lisp/cl.el.  There is a Texinfo manual describing
  2458.   these functions in man/cl.texinfo.
  2459.   
  2460. 103: How do I execute a piece of Emacs Lisp code?
  2461.   
  2462.   There are a number of ways to execute (called "evaluate") an Emacs Lisp
  2463.   "form":
  2464.   
  2465.   * If you want it evaluated every time you run Emacs, put it in a file
  2466.     named ".emacs" in your home directory.
  2467.   
  2468.   * You can type the form in the "*scratch*" buffer, and then type LFD (or
  2469.     C-j) after it.  The result of evaluating the form will be inserted in
  2470.     the buffer.
  2471.   
  2472.   * In in Emacs-Lisp mode, typing M-C-x evaluates a top-level form before
  2473.     or around point.
  2474.   
  2475.   * Typing "C-x C-e" in any buffer evaluates the Lisp form immediately
  2476.     before point and prints its value in the echo area.
  2477.   
  2478.   * Typing M-ESC or M-x eval-expression allows you to type a Lisp form in
  2479.     the minibuffer which will be evaluated.
  2480.   
  2481.   * You can use M-x load-file to have Emacs evaluate all the Lisp forms in
  2482.     a file.  (To do this from Lisp use the function "load" instead.)
  2483.   
  2484.   These functions are also used for evaluating Lisp forms:
  2485.   
  2486.     load-library, eval-region, eval-current-buffer, require, autoload
  2487.   
  2488. 104: How do I make a set of operations fully local to a region?
  2489.   
  2490.   Use narrow-to-region inside of save-restriction.
  2491.   
  2492. 105: How can I highlight text in Emacs?
  2493.   
  2494.   There are ways to get highlighting in GNU Emacs 18.57, but either they
  2495.   require patching the C code of Emacs and rebuilding, or they are slow
  2496.   and the highlighting disappears if you scroll or redraw the screen.  One
  2497.   patch is by Kenichi Handa <handa@etl.go.jp>.
  2498.   
  2499.   You can highlight regions in a variety of ways in Epoch.  GNU Emacs 19
  2500.   will have everything you need, but won't be out soon.
  2501.   
  2502. 106: How do I change Emacs's idea of the tab character's length?
  2503.   
  2504.   Example: (setq default-tab-width 10).
  2505.   
  2506.  
  2507.  
  2508. Carrying Out Common Tasks:
  2509.  
  2510. 107: How do I insert ">"'s in the beginning of every line in a buffer?
  2511.   
  2512.   Type "M-x replace-regexp RET ^ RET > RET".  ("replace-regexp" can be
  2513.   shortened to "repl TAB r".)
  2514.   
  2515.   To do this only in the region, type "C-x n M-x replace-regexp RET ^ RET
  2516.   > RET C-x w".  (You're going to remember that, right?)
  2517.   
  2518.   WARNING: The command narrow-to-region (C-x n) is disabled by default
  2519.   because it can be very confusing (ie., "Oh no!  Where did my file go?").
  2520.   
  2521. 108: How do I insert "_^H" characters before each character in a paragraph
  2522.  to get an underlined paragraph?
  2523.   
  2524.   M-x underline-region.
  2525.   
  2526. 109: How do I repeat a command as many times as possible?
  2527.   
  2528.   Use "C-x (" and "C-x )" to make a keyboard macro that invokes the command  +
  2529.   and then type "M-0 C-x e".
  2530.   
  2531.   WARNING: any messages your command prints in the echo area will be
  2532.   suppressed.
  2533.   
  2534. 110: How do I search for or delete unprintable (8-bit or control)
  2535.  characters?
  2536.   
  2537.   To search for a single character that appears in the buffer as, for
  2538.   example, \237, you can type "C-s C-q 2 3 7".  (This assumes the value of
  2539.   search-quote-char is 17 (C-q).)
  2540.   
  2541.   Searching for ALL unprintable characters is best done with a "regexp"
  2542.   search.  The easiest regexp to use for the unprintable chars is the
  2543.   complement of the regexp for the printable chars.
  2544.   
  2545.   Regexp for the printable chars: [\t\n\r\f -~]
  2546.   
  2547.   Regexp for the unprintable chars: [^\t\n\r\f -~]
  2548.   
  2549.   To type some of these special characters (\t, \n, \r, \f) as an
  2550.   interactive argument to isearch-forward-regexp or re-search-forward, you
  2551.   need to use C-q.
  2552.   
  2553.   So, to search for unprintable characters using re-search-forward:
  2554.   
  2555.     M-x re-search-forward RET [^ TAB C-q LFD C-q RET C-q C-l SPC -~] RET
  2556.   
  2557.   Using isearch-forward-regexp:
  2558.   
  2559.     M-C-s [^ TAB RET C-q RET C-q C-l SPC -~]
  2560.   
  2561.   To delete all unprintable characters, simply use a replace-regexp:
  2562.   
  2563.     M-x replace-regexp RET [^ TAB C-q LFD C-q RET C-q C-l SPC -~] RET RET
  2564.   
  2565.   Notes:
  2566.   
  2567.   * With isearch, you can type RET to get a quoted LFD (not a quoted RET).
  2568.   
  2569.   * You don't need to quote TAB with either isearch or typing something in
  2570.     the minibuffer.
  2571.   
  2572.   Here are the Emacs Lisp forms of the above regexps:
  2573.   
  2574.     ;; regexp matching all printable characters:
  2575.     "[\t\n\r\f -~]"
  2576.   
  2577.     ;; regexp matching all unprintable characters:
  2578.     "[^\t\n\r\f -~]"
  2579.   
  2580.     ;; alternative regexps for all unprintable characters:
  2581.     "[\C-@-\C-h\C-k\C-n-\C-_\C-?-\377]"
  2582.     "[\000-\010\013\016-\037\177-\377]"
  2583.   
  2584.   (To use "[\000-\010\013\016-\037\177-\377]" interactively, type:
  2585.   
  2586.     [ C-q 000 - C-q 010 C-q 013 C-q 016 - C-q 037 C-q 177 - C-q 377 ]
  2587.   
  2588.    )
  2589.   
  2590. 111: How do I control Emacs's case sensitivity when searching/replacing?
  2591.     
  2592.   For searching, the value of the variable case-fold-search determines
  2593.   whether they are case sensitive:
  2594.   
  2595.     (setq case-fold-search nil) ; make searches case sensitive
  2596.     (setq case-fold-search t)   ; make searches case insensitive
  2597.   
  2598.   Similarly, for replacing the variable case-replace determines whether
  2599.   replacements preserve case.
  2600.   
  2601. 112: How do I tell Emacs to automatically indent a new line to the
  2602.  indentation of the previous line?
  2603.   
  2604.   One solution is the major mode Indented Text Mode (M-x indented-tex-mode).
  2605.   
  2606.   If you have Auto-Fill mode on (a minor mode, see question 94),
  2607.   you can tell Emacs to prefix every line with a certain character
  2608.   sequence, the "fill prefix".  Type the prefix at the beginning of a
  2609.   line, position point after it, and then type "C-x ." (set-fill-prefix)
  2610.   to set the fill prefix.  Thereafter, auto-filling will automatically put
  2611.   the fill prefix at the beginning of new lines, and M-q (fill-paragraph)
  2612.   will maintain any fill prefix when refilling the paragraph.
  2613.   
  2614.   NOTE: If you have paragraphs with different levels of indentation, you
  2615.   will have to set the fill prefix to the correct value each time you move
  2616.   to a new paragraph.  To avoid this hassle, try one of the many packages
  2617.   available from the Emacs Lisp Archive.  Look up "fill" and "indent" in the
  2618.   Lisp Code Directory for guidance.
  2619.   
  2620. 113: How do I make Emacs "typeover" or "overwrite" when I type instead of
  2621.  inserting?
  2622.   
  2623.   M-x overwrite-mode (a minor mode).
  2624.   
  2625. 114: How do I show which parenthesis matches the one I'm looking at?
  2626.   
  2627.   If you're looking at a right parenthesis (or brace or bracket) you can
  2628.   delete it and reinsert it.  Emacs will blink the cursor on the matching
  2629.   parenthesis.
  2630.   
  2631.   M-C-f (forward-sexp) and M-C-b (backward-sexp) will skip over balanced
  2632.   parentheses, so you can see which parentheses match.  (You can train it
  2633.   to skip over balanced brackets and braces at the same time by modifying
  2634.   the syntax table.)
  2635.   
  2636.   Here is some Emacs Lisp that will make the % key show the matching
  2637.   parenthese, like in vi.  In addition, if the cursor isn't over a
  2638.   parenthese, it simply inserts a % like normal.
  2639.   
  2640.   (By an unknown contributor.)
  2641.   
  2642.     (global-set-key "%" 'match-paren)
  2643.   
  2644.     (defun match-paren (arg)
  2645.       "Go to the matching parenthesis if on parenthesis otherwise insert %."
  2646.       (interactive "p")
  2647.       (cond ((looking-at "\\s\(") (forward-list 1) (backward-char 1))
  2648.         ((looking-at "\\s\)") (forward-char 1) (backward-list 1))
  2649.         (t (self-insert-command (or arg 1)))))
  2650.   
  2651. 115: How do I make Emacs behave like this: when I go up or down, the cursor
  2652.  should stay in the same column even if the line is too short?
  2653.   
  2654.   M-x picture-mode.  (This is a minor mode, in theory anyway ...)
  2655.   
  2656. 116: How do I read news under Emacs?
  2657.   
  2658.   There are at least three news reading packages that operate inside Emacs.
  2659.   "rnews" comes with Emacs.  "GNUS" and "Gnews" come separately.  rnews will
  2660.   be replaced by GNUS in Emacs 19.
  2661.   
  2662.   rnews works only with a local news spool directory.  Both GNUS and Gnews
  2663.   handle reading news remotely via NNTP in addition to reading from a local
  2664.   news spool.  GNUS supports reading mail stored in MH folders or articles
  2665.   saved by GNUS.
  2666.   
  2667.   Gnews is styled after `rn' and seems to work like Rmail.  GNUS feels more
  2668.   like VM.  People have complained that GNUS uses a lot of CPU time (it
  2669.   does).  Some people have complained that Gnews is slower than GNUS.
  2670.   
  2671.   For more information about GNUS, see question 21.
  2672.   
  2673.   Gnews was written by Matthew P. Wiener <weemba@libra.wistar.upenn.edu>.
  2674.   The latest version seems to be 2.0, posted October 3, 1988.  Matthew
  2675.   posted some fixes on October 26, 1988.  Gnews does not appear to have been
  2676.   supported after this date.  In particular, it has been reported that Gnews
  2677.   does not work with Emacs 18.57.  There is a newsgroup for Gnews called
  2678.   gnu.emacs.gnews.
  2679.   
  2680. 117: In C mode, can I show just the lines that will be left after #ifdef
  2681.  commands are handled by the compiler?
  2682.   
  2683.   M-x hide-ifdef-mode.  (This is a minor mode.)
  2684.   
  2685.   You may have to (load "hideif") first.  If you want to do this
  2686.   regularly, put this in your .emacs file:
  2687.   
  2688.     (autoload 'hide-ifdef-mode "hideif" nil t)
  2689.   
  2690.   {Yes, I know, this should be in lisp/loaddefs.el already.}
  2691.   
  2692. 118: Is there an equivalent to the "." (dot) command of vi?
  2693.   
  2694.   ("." is the redo command in vi.  It redoes the last insertion/deletion.)
  2695.   
  2696.   No, not really.
  2697.   
  2698.   You can type "C-x ESC" (repeat-complex-command) to reinvoke commands
  2699.   that used the minibuffer to get arguments.  In repeat-complex-command
  2700.   you can type M-p and M-n to scan through all the different complex
  2701.   commands you've typed.
  2702.   
  2703.   To repeat something on each line I recommend using keyboard macros.
  2704.   
  2705. 119: How do I make Emacs show the current line (or column) number on the
  2706.  mode line?
  2707.   
  2708.   There is no "correct" way to constantly display the current line (or
  2709.   column) number on the mode line in Emacs 18.  Emacs is not a
  2710.   line-oriented editor, and really has no idea what "lines" of the buffer
  2711.   are displayed in the window.  It would require a lot of work at the C
  2712.   code level to make Emacs keep track of this.
  2713.   
  2714.   Emacs 19 will probably be able to do this, but probably not with great
  2715.   efficiency.
  2716.   
  2717.   To find out what line of the buffer you are on right now, do "M-x
  2718.   what-line".  Typing "C-x l" will also tell you what line you are on,
  2719.   provided the buffer isn't separated into "pages" with C-l characters.
  2720.   In that case, it will only tell you what line of the current "page" you
  2721.   are on.  WARNING: "C-x l" gives the wrong value when point is at the
  2722.   beginning of a line.
  2723.   
  2724.   People have written various kludges to display the current line number
  2725.   on the mode line.  Look in the Lisp Code Directory.  (See question 17.)
  2726.   
  2727. 120: How do I tell Emacs to iconify itself?
  2728.   
  2729.   You need to modify C source and recompile.  Either that or get Epoch
  2730.   instead.  For the interested I have a patch by Robert Forsman
  2731.   <thoth@reef.cis.ufl.edu> to allow Emacs to iconify itself and a patch by
  2732.   Matt Wette <mwette@mr-ed.jpl.nasa.gov> to allow Emacs to start up
  2733.   iconified.  I don't know whether these two patches work together.
  2734.   
  2735.   {Are either of these two patches available via anonymous FTP anywhere?}
  2736.   
  2737. 121: How do I use regexps (regular expressions) in Emacs?
  2738.   
  2739.   This is documented in the Emacs manual.  To read the manual section
  2740.   online, type "C-h i m emacs RET m regexps RET".
  2741.   
  2742.   WARNING: The `or' operator is `\|', not `|', and the grouping operators
  2743.   are `\(' and `\)'.  Also, the string syntax for a backslash is "\\".
  2744.   Thus, the string syntax for a regular expression like xxx\(foo\|bar\) is
  2745.   "xxx\\(foo\\|bar\\)".  Notice the duplicated backslashes!
  2746.   
  2747.   WARNING: Unlike in Unix grep, sed, etc., a complement character set
  2748.   ([^...])  can match a newline character (LFD aka C-j aka \n), unless
  2749.   newline is mentioned as one of the characters not to match.
  2750.   
  2751. 122: How do I perform a replace operation across more than one file?
  2752.   
  2753.   The "tags" feature of Emacs includes the command tags-query-replace
  2754.   which performs a query-replace across all the files mentioned in the
  2755.   TAGS file.  To read the relevant online manual section, type "C-h i m
  2756.   emacs RET m tags RET m tags search RET".
  2757.   
  2758.   In addition, Martin Boyer has written a package named global-replace
  2759.   which will perform a query-replace across all the files mentioned in the
  2760.   *compilation* buffer (usually done after a "grep"), which is available
  2761.   via anonymous FTP (ireq-robot.hydro.qc.ca:
  2762.   /pub/emacs/lisp/{compile,global-replace,query}.el.Z).
  2763.   
  2764. 123: How do I make Emacs wrap words for me?
  2765.   
  2766.   M-x auto-fill-mode.  The default maximum line width is 74, determined by
  2767.   the variable fill-column.  To find how to turn this on automatically see
  2768.   question 94.
  2769.   
  2770. 124: Where can I get a better spelling checker for Emacs?
  2771.   
  2772.   Use Ispell.  See question 21.
  2773.   
  2774. 125: How can I spell-check TeX or *roff documents?                           +
  2775.   
  2776.   If you want to spell-check TeX or *roff documents with ispell, put the     !
  2777.   following in your .emacs file.  The `delatex' program comes with TeX and   !
  2778.   `deroff' is available via anonymous FTP {where?}.  There is also a `detex' !
  2779.   program by Daniel Trinkle available via FTP (arthur.cs.purdue.edu:         !
  2780.   pub/trinkle/detex-2.3.tar.Z).                                              !
  2781.                                                                              !
  2782.     ;; by David G. Grubbs <dgg@ksr.com>:                                     !
  2783.     (setq ispell-filter-hook-args '("-w"))                                   !
  2784.                                                                              !
  2785.     (setq TeX-mode-hook                                                      !
  2786.           (function                                                          !
  2787.            (lambda ()                                                        !
  2788.              (setq ispell-filter-hook "delatex"))))                          !
  2789.                                                                              !
  2790.     (setq nroff-mode-hook                                                    !
  2791.           (function                                                          !
  2792.            (lambda ()                                                        !
  2793.              (setq ispell-filter-hook "deroff"))))                           !
  2794.   
  2795. 126: How can I make Emacs automatically scroll horizontally?
  2796.   
  2797.   Sorry, you can't.  The best you can do is rewrite a large number of
  2798.   commands and make them check if the point is still on the screen after
  2799.   they are done.  {Has someone done this already?}
  2800.  
  2801.